ListBox.ListIndex
From Xojo Documentation
This item was deprecated in version 2019r2. Please use ListBox.SelectedRowIndex as a replacement. |
Property (As Integer )
aListBox.ListIndex = newIntegerValue
or
IntegerValue = aListBox.ListIndex
Supported for all project types and targets.
or
IntegerValue = aListBox.ListIndex
Supported for all project types and targets.
The selected item number. The index is zero-based.
Notes
If no item is selected, ListIndex returns -1. If the ListBox is in multiple-row selection mode, then the number of the lowest selected row is returned. For example, if rows 1, 3, and 4 are selected, ListIndex returns 1.
You can put the ListBox into multiple-row selection mode by changing the SelectionType property.
Sample Code
The following code in the Change event handler displays the text in the first column of the selected row: