SORT LISTBOX COLUMNS

4D - Documentation   Français   English   German   4th Dimension 2004, Command Theme List   4th Dimension 2004, Command Alphabetical List   4th Dimension 2004, Constant Theme List   Back   Previous   Next

version 2004


SORT LISTBOX COLUMNS ({*; }object; colNum; order{; colNum2; order2; ...; colNumN; orderN})

ParameterTypeDescription
*If specified, object is an object name (string)
If omitted, object is a variable
objectForm objectObject name (if * is specified) or
Variable (if * is omitted)
colNumLongintColumn number(s) to sort
order> or <> to sort in ascending order or
< to sort in descending order

Description

The SORT LISTBOX COLUMNS command sorts the rows of the list box set in the object and * parameters on the basis of one or more column value(s).

If you pass the optional * parameter, you indicate that the object parameter is an object name (string). If you do not pass this parameter, you indicate that the object parameter is a variable. In this case, you do not pass a string, but a variable reference. For more information about object names, refer to the Object Properties section.

In colNum, pass the column number of the column whose values you want to use as the sort criteria. You can use any type of array data, except pictures and pointers.

In order, pass the symbol > or < to indicate the sort order. If order contains the "greater than" symbol (>), the sort order is ascending. If order contains the "less than" symbol (<), the sort oder is descending.

You can define multi-level sorts: to do so, pass as many pairs (colNum;order) as necessary. The sorting level is defined by the position of the parameter in the call.

In conformity with the principle of list box operation, the columns are synchronized which means that the sorting of a column is automatically passed on to all the other columns of the object.


4D - Documentation   Français   English   German   4th Dimension 2004, Command Theme List   4th Dimension 2004, Command Alphabetical List   4th Dimension 2004, Constant Theme List   Back   Previous   Next