WebListBox.ListIndex

From Xojo Documentation

Property (As Integer )
aWebListBox.ListIndex = newIntegerValue
or
IntegerValue = aWebListBox.ListIndex

Supported for all project types and targets.

The number of the currently selected row. ListIndex is zero-based. ListIndex defaults to -1 and reverts to -1 when no rows are selected.

Example

Check if a row has been selected and if it has, get the value in the first column:

Var person As String
If Me.ListIndex < 0 Then
MessageBox("Please select a row.")
Else
person = Me.Cell(Me.ListIndex, 0)
End If