FontPitch  Frame

Chapter 3: Property Descriptions and Usage

Format

Applies to

grDispAttr objects in a graph control

Description

The Format property allows you to define display formats for text objects in graphs. Display formats are masks in which certain characters have special significance.

The characters you use for formatting depend on the datatype of the data. PocketBuilder supports four kinds of display formats:

You can specify colors in any display format by specifying a color keyword before the format.

For more information about using colors and each kind of display format, see “Using colors with display formats for PocketBuilder controls” and the sections that follow it. For more information about defining display formats, see the User’s Guide.

Usage


In a painter

StepsTo set the display format for a text object:

  1. Display the Text tab page of the graph control’s Properties view.

  2. Select a text object in the Text Object list box.

  3. Enter an expression in the DisplayExpression field or select a format from the Format drop-down list.


In scripts

Each type of display format uses special characters that have special meaning for that format. The Format property takes a string value composed of these special characters.

The following example specifies a format for numeric data that always displays three digits, with two decimal places:

gr__1.Values.DispAttr.Format = "0.00"

The following example specifies a string format for alphanumeric data.

gr_1.Category.dispAttr.Format = "@@@/AAA"





Copyright © 2004. Sybase Inc. All rights reserved. Frame

View this book as PDF