ListIndex, ListItemId
These properties provide two different ways to identify the currently selected item in a list or combo box.
Usage |
oObject.ListIndex = nSelectItem nSelectItem = oObject.ListIndex oObject.ListItemId = nSelectItem nSelectItem = oObject.ListItemId |
Example |
* Find the contents of the selected item cCurItem = cboMyCombo.List[ ListIndex ] * or cCurItem = cboMyCombo.ListItem[ ListItemId ] * Remove the currently selected item lstMyList.RemoveItem[ ListIndex ] * or lstMyList.RemoveListItem[ ListItemId ] |
See Also |
AddItem, AddListItem, ComboBox, IndexToItemId, ItemData, ItemIdData, ItemIdToIndex, List Property, ListBox, ListItem, RowSourceType, Selected, SelectedId |