Sign in Join
FPDoc Onlineexperiment

TCustomTreeView.CustomSort function

Member of TCustomTreeViewpublicIn unit ComCtrls

If True, the external method specified in SortProc is used for sorting.

Declaration

pascal
function CustomSort(SortProc: TTreeNodeCompare): Boolean

Arguments

SortProc

Routine used to implement the sort procedure in the method.

Function result

Always returns False.

Description

CustomSort is a Boolean function used to sort the tree nodes in Items using the sort procedure specified in SortProc. If SortProc is not assigned, the DefaultTreeViewSort method is used in the sort procedure.

No actions are performed in the method when the number of tree nodes in Items is 0 (zero).

The return value is always False.

CustomSort calls BeginUpdate to minimize updates during the sorting process. EndUpdates is called when the sorting process is completed.

Top-level nodes in Items are sorted by calling the SortTopLevelNodes in items. Child nodes are then sorted (when present), starting at the first top-level node in the tree. The ClearCache method in Items is called to invalidate the node cache for the control.

The States property is updated to force the node coordinates and scroll bars to be refreshed in the control.

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.