wb_sort

bool wb_sort (int control [, bool ascending [, int subitem]])

Sorts the contents of a control, a control item, a ListView column or a sub-item. If the ascending parameter is TRUE (the default), the control or column is ordered starting with the lowest value or string, and vice-versa.

The sorting criteria between two given items, item1 and item2, are as follows:

Item 1

Item 2

Result

String or number

String

Alphabetical order according to system locale

String or number

Empty

The non-empty item is always greater than the empty one

Number

Number

Numeric comparison

In a ListView, wb_sort() sorts the column indexed by subitem. The index of the first column is zero.

Returns TRUE on success or FALSE if an error occurs.

See also

Control functions