TBaseVirtualTree.GetHitTestInfoAt Method

Virtual Tree View

Returns information about the node at the given position.

Pascal
procedure GetHitTestInfoAt(X: Integer; Y: Integer; Relative: Boolean; var HitInfo: THitInfo);
Description

This method returns information about the given hit position. If the position is not within the client area then the result is either of hiAbove, hiBelow, hiToLeft or hiToRight, depending on the side. If the position is within the client area but no node is hit (e.g. when the tree is empty) then hiNowhere is returned, otherwise the node is examined and HitInfo is filled with information about which node is hit by this position, which column is involved and where on the node is the hit (e.g. the caption, the expand/collapse button or the state image). 

 

The parameter Relative is used to tell the method how to interpret the given coordinates. If this property is true then X and Y are given in client coordinates of the tree window, otherwise they represent absolute coordinates of the virtual tree image.

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