RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TTreeView.SortType Property

Determines if and how the nodes in a tree view are automatically sorted.

Pascal
property SortType: TSortType;
C++
__property TSortType SortType;

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. 

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!