From Xojo Documentation

You are currently browsing the old Xojo documentation site. Please visit the new Xojo documentation site!

Property (As Integer )
aDesktopListBox.SortingColumn = newIntegerValue
IntegerValue = aDesktopListBox.SortingColumn

New in 2021r3

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.


The following code in the Pressed event of a DesktopButton asks the user to sort on a column if the DesktopListBox is not sorted by any column:

If Listbox1.SortingColumn = ListBox.None then
MessageBox("Please sort the rows by one of the columns.")
End If