From RAD Studio API Documentation
Jump to: navigation, search


function AlphaSort(ARecurse: Boolean = False): Boolean;


bool __fastcall AlphaSort(bool ARecurse = false);


Type Visibility Source Unit Parent
function public
Vcl.ComCtrls TTreeNode


Sorts tree nodes.

AlphaSort triggers node sorting or resorting of the node's child nodes. If an OnCompare event handler is defined for the associated TCustomTreeView, that routine determines sort order. If no OnCompare handler is defined, nodes are sorted by a simple case-sensitive comparison of their captions.

The optional ARecurse parameter (default False) specifies that sorting should recursively descend the node tree and sort each subtree in turn. By default, only the node's immediate children are sorted.

Calling AlphaSort is equivalent to calling CustomSort with a nil (Delphi) or NULL (C++) procedure parameter and a data parameter of 0.

To sort the top-level nodes, use the AlphaSort method of TTreeNodes.

Note: The AlphaSort does not work if the value of SortType is stNone.

See Also