Settings for the appearance of various text components of a graph.
Properties of Graph controls, as noted throughout this discussion
PowerBuilder dot notation:
dw_control.Object.graphname.property.DispAttr.fontproperty
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:
Painter: Alignment option. Alignment for axis labels and text not supported by Render3D graph style. |
AutoSize |
(exp) Whether the text element should be autosized according to the amount of text being displayed. Values are:
Painter: Autosize check box. |
BackColor |
(exp) A long value specifying the background color of the text. Painter: BackColor option. |
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. Painter: Display Expression option. |
Font.CharSet |
(exp) An integer specifying the character set to be used. Values are:
Painter: FontCharSet option. |
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. Painter: Escapement option. |
Font.Face |
(exp) A string specifying the name of the font face, such as Arial or Courier. Painter: FaceName option. |
Font.Family |
(exp) An integer specifying the font family (Windows uses both face and family to determine which font to use). Values are:
Painter: Family option. |
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. Painter: Size option, specified in points. |
Font.Italic |
(exp) Whether the text should be italic. Values are:
Painter: Italic option. |
Font.Orientation |
Same as Escapement. |
Font.Pitch |
(exp) The pitch of the font. Values are:
Painter: Pitch option. |
Font.Strikethrough |
(exp) Whether the text should be crossed out. Values are:
Painter: Strikeout option. |
Font.Underline |
(exp) Whether the text should be underlined. Values are:
Painter: Underline option. |
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. Painter: Width option. |
Format |
(exp) A string containing the display format for the text. Painter: Format option. |
TextColor |
(exp) A long specifying the color to be used for the text. Painter: TextColor option. |
Select the control and set values in the Properties view, Text tab. Settings apply to the selected item in the Text Object list box.
setting = dw1.Object.Category.LabelDispAttr.Font.Face
dw1.Object.Category.LabelDispAttr.Font.Face = "Arial"
setting = & dw1.Describe("Category.LabelDispAttr.Font.Face") dw1.Modify("gr_1.Category.LabelDispAttr.Font.Face= & 'Arial'") dw1.Modify("gr_1.Title.DispAttr.DisplayExpression=" & "'Title + ~"~n~" + Today()'")