sortCased

Type: Boolean (list box), Boolean array (table)

Availability: Read or write at run time only

The sortCased property controls whether the sorting of a ComboBox, ListBox, or Table control is case-sensitive. The sortCased property defaults to false.

If the sorted property of the list box is not set, the sortCased property has no meaning.

Each sheet of a Table control can have in the range zero through six sorted columns. The sorting sets these properties for the sheet, as required. Each sheet has an array of six items (the entries are 1‑relative).

The column numbers can be established at any time and are not validated when set. If the column is invalid, it is ignored when sorted.

If a sort column is zero (0), the remaining sort column values are ignored. If no sort column is set, no sorting is performed. Fixed rows of a table control are not sorted.

When the text of a sorted column changes, the automatic sorting of rows occurs only when the Table class addItem method adds a new row or the Table class resort method is used.

Windows sorts text in tables and list boxes by using the collating sequence of the locale that is in use. Uppercase and lowercase are sorted together into alphabetical order (for example, A b B c C d D).

As the number of rows can initially be set, the Table control keeps a record of the highest row that has had text set. The sort involves only the rows up to and including that row.

The code fragment in the following example shows the use of the sortCased property.

col := table2.accessColumn(7);
table2.sortColumn[1] := 7;
col.sortAsc := true;
col.sortCased := true;

The following table lists a column of characters and the results of the sortCased method.

Column to Sort Sorted Column
B a
e A
d b
b B
C c
a C
D d
c D
A e