Vcl.ComCtrls.TCustomTreeView.AlphaSort

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

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

C++

bool __fastcall AlphaSort(bool ARecurse = true);

Properties

Type Visibility Source Unit Parent
function public
Vcl.ComCtrls.pas
Vcl.ComCtrls.hpp
Vcl.ComCtrls TCustomTreeView

Description

Sort tree nodes.

AlphaSort triggers node sorting or resorting. If an OnCompare event handler is defined, that routine determines sort order. If no OnCompare handler is defined, nodes are sorted by a simple case-sensitive compare of their captions.

The optional ARecurse parameter (default true) specifies that sorting should recursively descend the node tree and sort each subtree in turn.

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

Calling AlphaSort has the same effect as calling the same method for the Items property, except that in TTreeNodes, AlphaSort is not recursive by default.

To sort a subtree, use the AlphaSort method in TTreeNodes.

See Also