ListBox.SortingColumn
From Xojo Documentation
Property (As Integer )
aListBox.SortingColumn = newIntegerValue
or
IntegerValue = aListBox.SortingColumn
New in 2019r2
Supported for all project types and targets.
or
IntegerValue = aListBox.SortingColumn
New in 2019r2
Supported for all project types and targets.
Gets or sets the current sort column but doesn't do the sort. The first column is numbered zero. If no column is sorted then it returns -1. Call the Sort method to sort the ListBox based on the values of SortingColumn and ColumnSortDirectionAt.
Example
The following code in the Pressed event of a Pushbutton asks the user to sort on a column if the ListBox is not sorted by any column: