ListBox.ColumnSortTypeAt

From Xojo Documentation

Method

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

New in 2019r2

Supported for all project types and targets.

Enables or disables column sorting. Column is zero-based.


Method

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

New in 2019r2

Supported for all project types and targets.

SortTypes is an enumeration and may be set to either:

  • ListBox.SortTypes.Sortable
  • ListBox.SortTypes.NotSortable

Notes

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 ListBox.AllColumns affects the header type of all columns.

Example

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) = ListBox.SortTypes.Sortable
Me.ColumnSortTypeAt(1) = ListBox.SortTypes.Sortable
Me.ColumnSortTypeAt(2) = ListBox.SortTypes.NotSortable