getlocalclick
VERTICAL
,
HORIZONTAL

The getlocalclick statement returns the location of the most recent mouse click in local coordinates (coordinates from the top left corner of the current form).


Parameters

This statement has two parameters:

vertical – field or variable in which the vertical coordinate will be placed.

horizontal – field or variable in which the horizontal coordinate will be placed


Description

This statement is used to capture coordinates of the most recent mouse click. It is intended that this statement be used in a procedure that is triggered by a button on a form (or any form object that triggers a procedure).

This example checks to see if the mouse was clicked more than 5 pixels away from the previous mouse click.

fileglobal  mouseV,mouseH
local  newV,newH
define mouseV,0 // default value if first click
define mouseH,0
getlocalclick newV,newH
if  abs(newV-mouseV)>5 or abs(newH-mouseH)>5
    message  "Clicked far away"
endif 
mouseV=newV  // new click becomes old for next time
mouseH=newH

The coordinates returned by the getlocalclick statement can be passed directly to the popup statement.


See Also


History

VersionStatusNotes
10.0No ChangeCarried over from Panorama 6.0.