ListBox.SortColumn

From Xojo Documentation

Event


ListBox.SortColumn(Column as Integer) As Boolean

Supported for all project types and targets.

The user has clicked on the passed column header to sort that column or the Sort method was called. Column is zero-based.

Notes

Return True if you don't want the ListBox to be sorted.

Note that sorting is based on string comparisons. If you want to sort numbers, dates or CheckBoxes then you have to use a custom sort in the ListBox.CompareRows event.

If you're trying to prevent the user from sorting the column in the first place, use ListBox.ColumnSortDirection.