TStringList.Sorted¶
Determines whether the list is sorted or not.
Declaration¶
Source position: classesh.inc line 1273
public property Sorted: Boolean;
Description¶
Sorted can be set to True in order to cause the list of strings to be sorted. Further additions to the list will be inserted at the correct position so the list remains sorted at all times. Setting the property to False has no immediate effect, but will allow strings to be inserted at any position.
Remark:
- When Sorted is True, TStringList.Insert cannot be used. For sorted lists, TStringList.Add should be used instead.
- If Sorted is True, the TStringList.Duplicates setting has effect. This setting is ignored when Sorted is False.
See also¶
| Name | Description |
|---|---|
| TStringList.Sort | Sorts the strings in the list. |
| TStringList.Duplicates | Describes the behaviour of a sorted list with respect to duplicate strings. |
| TStringList.Add | Implements the TStrings.Add function. |
| TstringList.Insert | Overrides the TStrings.Insert method. |