Returns the index of the element displayed at a given position in a TreeMap control.
// -- Optional code of mouse rollover for the TMAP_TreeMap1 control
HoveredElement is int
HoveredElement = TreeMapInfoXY(TMAP_TreeMap1, MouseXPos(), MouseYPos())
// Changes the element tooltip
IF HoveredElement > 0 THEN
TMAP_TreeMap1[HoveredElement].ToolTip = ...
"Hovered element: " + TMAP_TreeMap1[HoveredElement].Caption
END
Syntax
<Result> = TreeMapInfoXY(<TreeMap control> , <X> , <Y>)
<Result>: Integer
- Index of the element displayed at the specified position.
- -1 if no element corresponds to the specified position.
<TreeMap control>: Control name
Name of TreeMap control to use.
If this parameter corresponds to an empty string (""), the control used will be the TreeMap control to which the current event belongs.
<X>: Integer
X-coordinate (in pixels) to be analyzed. This coordinate is given in relation to the control.
<Y>: Integer
Y-coordinate (in pixels) to be analyzed. This coordinate is given in relation to the control.