Returns the horizontal position (X) of the mouse cursor in relation to the specified Image control.
This function can only be used in the click code of an Image control. This Image control has the following characteristics (in the "General" tab of the control description window):
- Action on click: "Server call"
- During the action: "Send click coordinates".
// Click code of IMG_IMAGE1
X is int = ImageXPos()
Y is int = ImageYPos()
IF X > Y THEN
STC_CAPTION1 = "Top - Right"
STC_CAPTION1 = "Bottom - Left"
Horizontal position (or X-coordinate) in pixels of the mouse cursor in relation to the upper-left corner of the Image control on which the left mouse button was pressed.
This value is undefined if ImageXPos is used in an event other than the click code of an Image control with an action set to "Send click coordinates" ("General" tab of the control description window).
If your project uses pre-launched sessions, this function must not be used in the project initialization event. This function must be used in the "Initializing the project after connection to the site" event.