Retrieves the selected item's handle given its index in selected items collection.


| Type | Description | |||
| Index as Long | Identifies the index of the selected item into the selected items collection. | |||
| HITEM | A long expression that indicates the handle of the selected item. |
If the control support multiple selection, you can use the SelectCount property to find out how many items are selected in the control.
The following sample shows hot to print the caption for the selected cell: Debug.Print Group.Items.CellCaption(Group.Items.SelectedItem(0), 0).
The following sample underlines the selected item in the first group:
Private Sub ExplorerTree1_SelectionChanged(ByVal Group As EXPLORERTREELibCtl.IGroup)
If (Group.Index = 0) Then
With Group.Items
If Not hOldItem = 0 Then
.ItemUnderline(hOldItem) = False
End If
hOldItem = .SelectedItem()
.ItemUnderline(hOldItem) = True
End With
End If
End Sub