The PowerBuilder class grDispAttr is used to specify the appearance of text objects on a graph. There are grDispAttr objects for graph Titles, Legends, Pie Graph text, and two (DispAttr and LabelDispAttr) for each of the three axes (Category, Series, and Value) in a graph.
To refer to a property of a grDispAttr property, use this syntax:
graphcontrolname.axisname.grdispattrname.property
For example:
gr_1.Series.DispAttr.Italic gr_1.Category.LabelDispAttr.DisplayExpression
A grDispAttr object has no events.
grDispAttr property |
Datatype |
Description |
---|---|---|
Alignment (enumerated) |
Specifies the alignment of the text. Values are:
|
|
Boolean |
Specifies whether the text element should be autosized according to the amount of text being displayed. Values are:
|
|
Long |
Specifies the numeric value of the background color: –2 to 16,777,215. For more information about color, see the RGB function in the PowerScript Reference. |
|
ClassDefinition |
PowerObject |
An object of type PowerObject containing information about the class definition of the object or control. |
String |
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. |
|
Integer |
Specifies the rotation for the baseline of the text in tenths of a degree. 0 is horizontal. A value of 900 rotates the text 90 degrees; a value of 2700 rotate the text 270 degrees. |
|
String |
Specifies a typeface name (for example, ARIAL) to use for the text. |
|
FillPattern (enumerated) |
Specifies the fill pattern for the text. Values are:
FDiagonal! is lines going from the lower left to the upper right. BDiagonal! is lines going from the upper left to the lower right. |
|
FontCharSet (enumerated) |
Specifies the font character set to be used. For a complete list of possible values, see the list of properties for the FontCharSet variable on the Enumerated tab page of the Browser. |
|
FontFamily (enumerated) |
Specifies the font family (type style) for the text. Values are:
|
|
FontPitch (enumerated) |
Specifies the pitch (character spacing) for the text. Values are:
|
|
String |
Specifies the display format for the text. |
|
Boolean |
Specifies whether the text is italic. Values are:
|
|
Long |
Specifies the color of the text. The color is a numeric value: -2 to 16,777,215. For more information about color, see the RGB function in the PowerScript Reference. |
|
Integer |
Specifies the point size of the text. For backward compatibility, the size is stored as a negative number; for example, 10-point text size is stored as -10. |
|
Boolean |
Specifies whether the text is underlined. Values are:
|
|
Integer |
Specifies the stroke weight of the text. Sample values are 400 for normal or 700 for bold. |
grDispAttr function |
Datatype returned |
Description |
---|---|---|
String |
Returns the name assigned to the user object. |
|
Integer |
Creates a reference to a context-specific instance of the specified service. |
|
PowerObject |
Returns a reference to the name of the parent object. |
|
Object |
Returns the type of the user object. |