|
|
|
|
|
- Taking the sort order into account
- Characters taken into account for punctuation and spaces
SortOption (Property) In french: OptionTri
The SortOption property gets and sets the sort options used in: - text columns in Table controls,
- text columns in TreeView Table controls,
- List Box and ListView controls,
- Combo Box controls,
- attributes of Looper controls,
- images, clickable images and thumbnails with automatic sequence.
This property can only be used on controls populated programmatically. It is not available for controls based on a data file. These sort options can be defined in the window editor or in the page editor, in the "Details" tab of the control description. LIST_Turnover.SortOption = ccRespectNumeric Syntax
Getting the sort options used Hide the details
<Sort options> = <Control used>.SortOption
<Sort options>: Integer constant Sort option currently applied:
| | ccIgnoreAccent | Sorts text while ignoring accents | ccIgnoreCase | Sorts text while ignoring the case (uppercase/lowercase characters) | ccIgnorePunctuationAndSpace | Sorts text while ignoring punctuation and spaces (for more details, see the Notes) | ccIgnoreSpace | Sorts text while ignoring leading and trailing spaces in the strings | ccLexicographicOrder | Sorts the strings in lexicographical order (for example, 'é' is between 'e' and 'f') | ccNormal (Default value) | Standard comparison, similar to the = operator | ccRespectNumeric | Sorts text while taking into account the numeric values within the strings (e.g., "10" comes after "9"). | sortDefault | Performs a case-insensitive and accent-insensitive sort. Ignores spaces | sortWithoutFunctionGxxx | Sorts text while ignoring gImage, gStoredValue, etc., ... By default, these elements are taken into account for the sort. |
<Control used>: Control name Name of the control to be used.
Changing the sort options Hide the details
<Control used>.SortOption = <Sort options>
<Control used>: Control name Name of the control to be used. <Sort options>: Combination of Integer constants Sort option that will be applied to the control:
| | ccIgnoreAccent | Sorts text while ignoring accents | ccIgnoreCase | Sorts text while ignoring the case (uppercase/lowercase characters) | ccIgnorePunctuationAndSpace | Sorts text while ignoring punctuation and spaces (for more details, see the Notes) | ccIgnoreSpace | Sorts text while ignoring leading and trailing spaces in the strings | ccLexicographicOrder | Sorts the strings in lexicographical order (for example, 'é' is between 'e' and 'f') | ccNormal (Default value) | Standard comparison, similar to the = operator | ccRespectNumeric | Sorts text while taking into account the numeric values within the strings (e.g., "10" comes after "9"). | sortDefault | Performs a case-insensitive and accent-insensitive sort. Ignores spaces | sortWithoutFunctionGxxx | Sorts text while ignoring gImage, gStoredValue, etc., ... By default, these elements are taken into account for the sort. |
Remarks Taking the sort order into account - For List and Combo Box controls, the sort order specified with the SortOption property is applied immediately.
- For columns in Table or TreeView Table controls, TableSort must be called to apply the specified sort order. For example:
COL_Name.SortOption = ccLexicographicOrderTableSort(TABLE_Name, "+COL_Name")
Characters taken into account for punctuation and spaces The characters taken into account for punctuation and spaces are provided by the system. To get the list of these characters, write the following WLanguage code:
s is string FOR i = 0 TO 255 IF Charact(i) <> StringFormat(Charact(i), ccIgnorePunctuationAndSpace) THEN Â s += Charact(i) END END Info(s) ToClipboard(s)
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|