Vcl.ComCtrls.TTreeView.SortType
Delphi
property SortType;
C++
__property SortType = {default=0};
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
property | published | Vcl.ComCtrls.pas Vcl.ComCtrls.hpp |
Vcl.ComCtrls | TTreeView |
Description
Determines if and how the nodes in a tree view are automatically sorted.
Vcl.ComCtrls.TTreeView.SortType inherits from Vcl.ComCtrls.TCustomTreeView.SortType. All content below this line refers to Vcl.ComCtrls.TCustomTreeView.SortType.
Determines if and how the nodes in a tree view are automatically sorted.
Once a tree view is sorted, the original hierarchy is lost. That is, setting the SortType back to stNone will not restore the original order of items. These are the possible values:
Value | Meaning |
---|---|
stNone |
No sorting is done. |
stData |
The items are sorted when the Data object or SortType is changed. |
stText |
The items are sorted when the Caption or SortType is changed. |
stBoth |
The items are sorted when either the Data object, the Caption or SortType is changed |
Optionally, the OnCompare event can be hooked to handle comparisons.