grDispAttr object

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.

Properties

grDispAttr property

Datatype

Description

Alignment

Alignment (enumerated)

Specifies the alignment of the text. Values are:

Center!

Justify!

Left!

Right!

Alignment

Boolean

Specifies whether the text element should be autosized according to the amount of text being displayed. Values are:

TRUE -- Autosize.

FALSE -- Do not autosize.

BackColor

Long

Specifies the numeric value of the background color: -2 to 16,777,215. For more information about color, see the section called “RGB” in PowerScript Reference.

ClassDefinition

PowerObject

An object of type PowerObject containing information about the class definition of the object or control.

DisplayExpression

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.

Escapement

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 rotates the text 270 degrees.

FaceName

String

Specifies a typeface name (for example, arial or courier) to use for the text.

FillPattern

FillPattern (enumerated)

Specifies the fill pattern for the text. Values are:

BDiagonal!

Diamond!

FDiagonal!

Horizontal!

Solid!

Square!

Vertical!

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

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

FontFamily (enumerated)

Specifies the font family (type style) for the text. Values are:

AnyFont!

Decorative!

Modern!

Roman!

Script!

Swiss!

FontPitch

FontPitch (enumerated)

Specifies the pitch (character spacing) for the text. Values are:

Default!

Fixed!

Variable!

Format

String

Specifies the display format for the text.

Italic

Boolean

Specifies whether the text is italic. Values are:

TRUE -- Text is italic.

FALSE -- Text is not italic.

TextColor

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 section called “RGB” in PowerScript Reference.

TextSize

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.

Underline

Boolean

Specifies whether the text is underlined. Values are:

TRUE -- Text is underlined.

FALSE -- Text is not underlined.

Weight

Integer

Specifies the stroke weight of the text. Sample values are 400 for normal or 700 for bold.


Functions

grDispAttr function

Datatype returned

Description

ClassName in PowerScript Reference

String

Returns the name assigned to the user object.

GetContextService in PowerScript Reference

Integer

Creates a reference to a context-specific instance of the specified service.

GetParent in PowerScript Reference

PowerObject

Returns a reference to the name of the parent object.

TypeOf in PowerScript Reference

Object

Returns the type of the user object.