Label property for PowerScript controls
Controls
grAxis objects in Graph controls, ListViewItem objects, TreeViewItem
objects
Description
Within graphs
The Label property specifies the label of an axis of the graph.
Within ListView and TreeView controls
The Label property specifies the label associated with a ListViewItem
or TreeViewItem object.You cannot manipulate items in TreeView controls
in a painter. You must write scripts to add items to a TreeView.
Usage
In a painter
To specify an Axis label in a graph control:
-
Display the Axis tab page of the graph
control’s Properties view. -
Select the desired axis from the Axis drop-down
list. -
Enter the label text in the Label text field.
To specify labels for items in a ListView control:
-
Display the Items tab page of the ListView
control’s Properties view. -
For each item, enter label text in the appropriate
Text field.
In scripts
The Label property takes a string value. The following example
sets text for the label on the Values axis of graph gr_1.
1 |
gr_1.Values.Label = 'Lawsuits per 1000' |
To add or insert an item with a label into a ListView control,
use the AddItem or InsertItem functions.
For example, this line adds an item to ListView control lv_1,
specifying the label and picture index for the item:
1 |
lv_1.AddItem ( "Oranges", 1) |
To change the label, get the item from the ListView and set
the item’s Label property:
1 |
ListViewItem lvi |
1 |
lv_1.GetItem(4, lvi) |
1 |
lvi.Label = "Apples" |
1 |
lv_1.SetItem(4, lvi) |
To add or insert items in a TreeView control, use the InsertItem, InsertItemFirst, InsertItemLast,
or InsertItemSort functions.
For more information, see “Using TreeView Controls” and “Using
ListView Controls” in Application Techniques.