|
|
|
SftTreeItems.Selection Method |
Returns the selected item.
Syntax
VB.NET |
ItemIndex = object.Selection(ByVal SelectionIndex As Integer) As Integer |
||
VB |
ItemIndex = object.Selection(ByVal SelectionIndex As Long) As Long |
||
C#.NET |
int ItemIndex = object.Selection(int SelectionIndex); |
||
VC++ |
long ItemIndex = object->Selection(long SelectionIndex); |
||
C |
HRESULT object->raw_Selection(long SelectionIndex, long* ItemIndex); |
||
Delphi |
ItemIndex := object.Selection(SelectionIndex : Integer) : Integer; |
object
A SftTreeItems object.
SelectionIndex
The entry number of the selected item index to return.
ItemIndex
Returns the item index of the nth selected item as specified by SelectionIndex. -1 is returned if no item is selected.
Comments
The Selection method returns the selected item.
The Selection property returns the zero-based index of the nth selected item as specified by SelectionIndex. In a single selection tree control (see Items.MultiSelect property), SelectionIndex is specified as 0. The first (and only) selected item is returned or -1 if no item is selected.
In a multiple selection tree control, the index of all selected items can be retrieved. The Items.SelectionCount property returns the number of selected items. The Items.SelectionGroupStart and Items.SelectionGroupEnd properties are used to retrieve groups of selected items.
See Also SftTreeItems Object | Object Hierarchy