DesktopListBox.ColumnSortDirectionAt

From Xojo Documentation

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

aDesktopListBox.ColumnSortDirectionAt(columnNumber as Integer) = newDesktopListBox.SortDirectionsValue
or
DesktopListBox.SortDirectionsValue = aDesktopListBox.ColumnSortDirectionAt(columnNumber as Integer)

New in 2021r3

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 DesktopListBox.SortDirections.

Example

This example sets the sort direction for a column.

ListBox1.ColumnSortDirectionAt(2) = DesktopListBox.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