EControl Syntax Editor SDK
TSyntaxTreeView.OnCompare Property

Occurs when two nodes must be compared during a sort of the nodes in the tree view.

property OnCompare;

Write an OnCompare event handler to customize the sort order of the nodes in the tree view. Set the Compare parameter to a value less than 0 if Node1 is less than Node2. Set Compare to 0 if Node1 is equivalent to Node2, and set Compare to a value greater than 0 if Node1 is greater than Node2. If an OnCompare event handler is not provided, tree view nodes are sorted alphabetically, based on their labels.

Copyright (c) 2004-2011. All rights reserved.
What do you think about this topic? Send feedback!