The current selection.
Usage
Set_Property(OLECtrlEntID, "OLE.Selection", Array)
Values
Array has the following structure:
Pos | Name | Type | Description | Default |
---|---|---|---|---|
<1> | Item | Text | Item that is selected | "" |
Remarks
The Selection property is the list of all selected items. The data is returned in an @FM delimited array of items. Each item is identified by the index of the group it is within and its own index within the group. To maintain consistency with property indexing, the group and item indexes are semicolon delimited, such as "1;1".
For example, you have 3 groups, and the first item in each group is selected. The value returned would be:
"1;1":@FM:"2;1":@FM:"3;1"
If no values are selected, then this property is empty.
You may also use this property to programmatically set the selected items. Just pass in an @FM delimited list of items you want selected in the same format described above. Any previously selected items not appearing in the new list are deselected.
Selection will return nothing if either field of the SelectBehavior property is set to "None". Nor can items be programmatically selected in this case.
Example
// Get the selected items and determine how many there are SelItems = Get_Property(@Window:".OLE_SHORTCUT", "OLE.Selection") NumSelItems = Count(SelItems, @FM) + (SelItems NE "") // Set the selected items SelItems = "1;1":@FM:"2;1":@FM:"3;1" Set_Property(@Window:".OLE_SHORTCUT", "OLE.Selection", SelItems) // Remove all selections Set_Property(@Window:".OLE_SHORTCUT", "OLE.Selection", "")