From Xojo Documentation

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

DesktopListBox.ColumnSortTypeAt(Column as Integer) As DesktopListBox.SortTypes

New in 2021r3

Supported for all project types and targets.

Enables or disables column sorting.


DesktopListBox.ColumnSortTypeAt(Column as Integer, Assigns value as DesktopListBox.SortTypes)

New in 2021r3

Supported for all project types and targets.

SortTypes is an enumeration and may be set to either:

  • DesktopListBox.SortTypes.Sortable
  • DesktopListBox.SortTypes.NotSortable


The default is Sortable. Sortable means that the column can be clicked on and will display mouse over events. If the column is NotSortable, then the header cannot be clicked on and will not display mouse over events. Setting Column to DesktopListBox.AllColumns affects the header type of all columns.


The following code in the Open event of the ListBox sets the first two columns as sortable and the third column as non-sortable.

Me.ColumnSortTypeAt(0) = DesktopListBox.SortTypes.Sortable
Me.ColumnSortTypeAt(1) = DesktopListBox.SortTypes.Sortable
Me.ColumnSortTypeAt(2) = DesktopListBox.SortTypes.NotSortable