DispAttr.fontproperty

Description

Settings for the appearance of various text components of a graph.

Applies to

Properties of Graph controls, as noted throughout this discussion

Syntax

Describe and Modify argument:

"graphname.property.DispAttr.fontproperty { = value }"

Parameter

Description

graphname

The Graph control in a DataWindow for which you want to get or set font appearance values.

property

A text component of the graph, such as an Axis keyword (Category, Series, or Values), Legend, Pie, or Title, specifying the graph component whose appearance you want to get or set. These properties have their own entries. These values are listed in the following table.

You can also set font properties for the label of an axis with the following syntax:

"graphname.axis.LabelDispAttr.fontproperty { = value }"

fontproperty

A property that controls the appearance of text in the graph. Properties and their settings are listed in the table below.

value

The value to be assigned to fontproperty. Value can be a quoted DataWindow expression.

Property for DispAttr

Value

Alignment

(exp) The alignment of the text.

Values are:

  • 0 – Left

  • 1 – Right

  • 2 – Center

AutoSize

(exp) Whether the text element should be autosized according to the amount of text being displayed.

Values are:

  • 0 – Do not autosize

  • 1 – Autosize

BackColor

(exp) A long value specifying the background color of the text.

DisplayExpression

An expression whose value is the label for the graph component. The default expression is the property containing the text for the graph component. The expression can include the text property and add other variable text.

Font.CharSet

(exp) An integer specifying the character set to be used.

Values are:

  • 0 – ANSI

  • 1 – The default character set for the specified font

  • 2 – Symbol

  • 128 – Shift JIS

  • 255 – OEM

Font.Escapement

(exp) An integer specifying the rotation for the baseline of the text in tenths of a degree. For example, a value of 450 rotates the text 45 degrees. 0 is horizontal.

Font.Face

(exp) A string specifying the name of the font face, such as Arial or Courier.

Font.Family

(exp) An integer specifying the font family (Windows uses both face and family to determine which font to use).

Values are:

  • 0 – AnyFont

  • 1 – Roman

  • 2 – Swiss

  • 3 – Modern

  • 4 – Script

  • 5 – Decorative

Font.Height

(exp) An integer specifying the height of the text in the unit of measure for the DataWindow. To specify size in points, specify a negative number. Not available when AutoSize is checked.

Font.Italic

(exp) Whether the text should be italic.

Values are:

  • 0 – Not italic (default)

  • 1 – Italic

Font.Orientation

Same as Escapement.

Font.Pitch

(exp) The pitch of the font.

Values are:

  • 0 – The default pitch for your system

  • 1 – Fixed

  • 2 – Variable

Font.Strikethrough

(exp) Whether the text should be crossed out.

Values are:

  • 0 – Not crossed out (default)

  • 1 – Crossed out

Font.Underline

(exp) Whether the text should be underlined.

Values are:

  • 0 – Not underlined (default)

  • 1 – Underlined

Font.Weight

(exp) An integer specifying the weight of the text, for example, 400 for normal or 700 for bold.

Painter: Set indirectly using the Bold option.

Font.Width

(exp) An integer specifying the width of the font in the unit of measure specified for the DataWindow. Width is usually unspecified, which results in a default width based on the other properties.

Format

(exp) A string containing the display format for the text.

TextColor

(exp) A long specifying the color to be used for the text.

Usage


In the painter

Select the control and set values in the Properties window, Text category. Settings apply to the selected item in the Text Object list box.

Examples

Example 1

[Visual Basic]
setting =  _
   dw1.Describe("Category.LabelDispAttr.Font.Face")

dw1.Modify("Category.LabelDispAttr.Font.Face='Arial')
dw1.Modify("Title.DispAttr.DisplayExpression="  "'Title + ~"~n~" + Today()'")