[Overview][Constants][Types][Classes][Procedures and functions][Index] | Reference for unit 'ComCtrls' (#lcl)

# TSortType

Indicates the sort mechanism used for the items in tree view and list view controls.

## Declaration

Source position: comctrls.pp line 979

`type TSortType = (`
`stNone,` |  | Sorting is not used for list items.
`stData,` |  | List items are sorted by their data and not their display text.
`stText,` |  | List items are sorted by their display text and not their data.
`stBoth` |  | List items are sorted using both display text and data.
`);`

## Description

TSortType is an enumerated type with values indicating the sort mechanism used for items in tree view or list view controls. TSortType is the type used to implement the SortType property in both TCustomTreeView and TCustomListView.

## See also

TCustomTreeView.SortType |  | Allows items to be sorted by caption, by the Data property, or both.
TCustomTreeView.AlphaSort |  | Sorts tree nodes using default sort procedure (alphabetic).
TCustomTreeView.CustomSort |  | If True, the external method specified in SortProc is used for sorting.
TCustomListView.SortType |  | Specifies the sorting mechanism used for the current SortColumn.
TCustomListView.Sort |  | Sorts the values in Items using the SortType, SortColumn, and SortDirection for the control.