[Overview][Constants][Types][Classes][Procedures and functions][Variables] Reference for unit 'Classes' (#rtl)

TStringList.Sorted

Determines whether the list is sorted or not.

Declaration

Source position: classesh.inc line 576

public property TStringList.Sorted: Boolean
  read FSorted
  write SetSorted;

Description

Sortedcan be set to Truein 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 Falsehas no immediate effect, but will allow strings to be inserted at any position.

Remark:
  1. When Sortedis True, TStringList.Insertcannot be used. For sorted lists, TStringList.Addshould be used instead.
  2. If Sortedis True, the TStringList.Duplicatessetting has effect. This setting is ignored when Sortedis False.

See also

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.Addfunction.

TstringList.Insert

  

Overrides the TStrings.Insertmethod.