TBaseVirtualTree.CountLevelDifference Method

Virtual Tree View

Determines the level difference of two nodes.

Pascal
function CountLevelDifference(Node1: PVirtualNode; Node2: PVirtualNode): Integer; virtual;
Description

This method counts how many indentation levels the given nodes are apart. If both nodes have the same parent then the difference is 0 otherwise the result is basically GetNodeLevel(Node2) - GetNodeLevel(Node1), but with sign. If the result is negative then Node2 is less intended than Node1.

Class
Links
What do you think about this topic? Send feedback!