Returns the selected item.
|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);|
A SftTreeItems object.
The entry number of the selected item index to return.
Returns the item index of the nth selected item as specified by SelectionIndex. -1 is returned if no item is selected.
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.