ListBox.ColumnSortDirectionAt

From Xojo Documentation

Property (As ListBox.SortDirections )
aListBox.ColumnSortDirectionAt(columnNumber as Integer) = newListBox.SortDirectionsValue
or
ListBox.SortDirectionsValue = aListBox.ColumnSortDirectionAt(columnNumber as Integer)

New in 2019r2

Supported for all project types and targets.

Used to get or set the sort direction for the passed column. The first column is numbered zero.

Notes

You set the sort direction using ListBox.SortDirections.

Example

This example sets the sort direction for a column.

ListBox1.ColumnSortDirectionAt(2) = ListBox.SortDirections.Descending

ColumnSortDirectionAt doesn't actually sort the rows; it only establishes the sort direction that is used when the Sort method is called. The sort direction can be set even if there is no header for the ListBox.

If you set ColumnSortDirectionAt to None, the user can't sort the column by clicking its header. This will block the usual calls to the SortColumn and CompareRows events.

See Also

Sort, SortDirections