DesktopListBox.ColumnSortTypeAt

From Xojo Documentation

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

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

New in 2021r3

Supported for all project types and targets.

Enables or disables column sorting.


Method

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

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