ProvideX V8.20 > Language Reference > 7. Control Object Properties
726
In some instances the contents of the list box may need to be shown prior to the contents
being loaded, in which case the system will display 5 dots in place of the data.
For more information, refer to the LIST_BOX Directive, p.177.
Multiple Selections (Grid, List Box, List View, Tree View)
The following properties are used to process multiple selections in lists and grids:
'SelectCount
Number of items/cells selected. (Set this property to zero to
de-select all.)
'SelectIndex
Index to 'SelectItem. Set this to point to a selected element;
e.g., set to 1 to point at the first item selected, 2 to point at the
second item selected, etc.
The following property applies to lists only:
'SelectItem
Item number in list selected. This returns the sequential
location within the list of the item being pointed at by the
'SelectIndex property.
Refer to the LIST_BOX Directive, p.182 or the GRID Directive, p.142 for more
information on the controls described.
Example:
FOR I = 1 TO LB1'SelectCount
LB1'SelectIndex = I; PRINT LB1'SelectItem; NEXT
In Tree Views
In addition to the above properties, tree view controls support the following:
'SelectedChildren Number Of Child Items.
'SelectStateMask  State filter to apply.
Use 'SelectedChildren in conjunction with 'SelectedStateMask to return the
number of child items with the desired state.
When 'SelectedStateMask is set, the 'SelectCount, 'SelectIndex, and 'SelectItem
properties will reflect only those items that have the specified state; e.g., to find all
items that have a state of one, set 'SelectStateMask to 1. 'SelectCount will then
indicate the number of items that have this state and sequencing through
'SelectIndex and 'SelectItem will return their item numbers.
In Grids
The following properties can be applied to grids for access to selected items based on
the location defined by 'SelectIndex:
'SelectRow
Row number of selected cell.
'SelectColumn
Column number of selected cell.
'SelectValue$
Value within selected field.