Topic: APLX Help : System Classes : Methods : Hittest
[ Previous | Next | Contents | Index | APL Home ]

www.microapl.co.uk

The 'Hittest' method


Implemented under Windows only

Argument: Two-element numeric vector
Result: Two-element nested vector

Valid for: Tree

The Hittest method takes a coordinate of a point in the Tree object, and determines whether the point is on a node and if so which node. It also returns information about which area of the node it corresponds to.

The argument is a two-element vector containing the vertical and horizontal coordinates of the point, relative to the top left of the control and expressed in the object's current scale.

The result is a two-element nested vector. The first element is an integer, which is the ID of the node at the given point, or 0 if the point does not correspond to a node. The second element is a character vector, indicating which area of the node the point corresponds to. It is one of the strings: 'image', 'button', 'label', 'imageuser', 'indent', 'noderight', 'above', 'below', 'toleft', 'toright', 'aboveleft', 'aboveright', 'belowleft', 'belowright' or 'nowhere', or an empty vector if the position is unknown.


Topic: APLX Help : System Classes : Methods : Hittest
[ Previous | Next | Contents | Index | APL Home ]