@CLICK |
|
| Top Previous Next | |
Syntax:
@CLICK(<flags> , <top>, <left>, <bottom>, <right>)
Description:
This function can be used after a CLICK event has been generated by some dialog elements, to find out which button was clicked.
In the case of BITMAP dialog elements, it can be used to find out where on the bitmap the mouse was clicked.
The information is returned as a string, consisting of one or more items as specified by the flags. If more than one item is specified then each item is separated by a field separator character in a form that can be processed by the PARSE command.
The flags are:
B |
function returns LEFT, RIGHT or CENTER depending on which mouse button was pressed. |
N |
function returns the name of the dialog element over which the mouse was clicked. |
X, Y |
for BITMAP elements, function returns the X or Y co-ordinates of the pointer when the mouse was clicked. |
R |
for BITMAP elements, function returns the value 1 (true) if the mouse was clicked within the region bounded by the co-ordinates <top>, <left>, <bottom> and <right>, otherwise it returns null (false). |
U |
for EXTTEXT elements, returns the URL or filename when the user clicks on a hyperlink. |
OK:
Set to false if one of the REGION parameters is invalid. Otherwise unchanged.
Example:
:loop
wait event
if @equal(@event(),click)
parse "%B;%X;%Y",@click(BXY)
info You clicked the %B Button@CR()Co-ords X: %X Y: %Y
end
goto loop
See also: