Difference between revisions of "ON MOUSE"
Yvonnemilne (Talk | contribs) |
Yvonnemilne (Talk | contribs) |
||
Line 1: | Line 1: | ||
− | |||
− | |||
− | |||
==Class== | ==Class== | ||
− | + | Screen Forms | |
Line 15: | Line 12: | ||
==See Also== | ==See Also== | ||
− | [[INKEY()]], [[LASTKEY()]], [[MCOL()]], [[MROW()]] | + | [[INKEY()]], [[ISMOUSE()]], [[LASTKEY()]], [[MCOL()]], [[MROW()]] |
Line 29: | Line 26: | ||
<code lang="recital"> | <code lang="recital"> | ||
procedure on_mouse | procedure on_mouse | ||
− | m_colpos = mcol() | + | m_colpos = mcol() |
− | m_rowpos = mrow() | + | m_rowpos = mrow() |
− | m_mouseop = lastkey() | + | m_mouseop = lastkey() |
− | // process based on position and operation | + | // process based on position and operation |
return | return | ||
Line 44: | Line 41: | ||
[[Category:Documentation]] | [[Category:Documentation]] | ||
[[Category:Commands]] | [[Category:Commands]] | ||
+ | [[Category:Screen Forms]] | ||
+ | [[Category:Screen Forms Functions]] |
Revision as of 12:26, 9 June 2009
Class
Screen Forms
Purpose
Execute a command when a menu operation occurs
Syntax
ON MOUSE [<command>]
See Also
INKEY(), ISMOUSE(), LASTKEY(), MCOL(), MROW()
Description
The ON MOUSE command is used to specify a command which will be executed when a mouse operation occurs. Recital Mirage traps mouse operations using the INKEY(<expN>,"M") function. The INKEY() or LASTKEY() functions can be used to determine the operation which took place and the MCOL() and MROW() functions return the current mouse column and row position on the screen.
The specified command, <command>, may be any Recital/4GL command and may be a call to a function or to DO a procedure. Used without a specified command, the ON MOUSE command disables previously specified commands.
In Recital Terminal Developer the ON MOUSE command is ignored.
Example
procedure on_mouse m_colpos = mcol() m_rowpos = mrow() m_mouseop = lastkey() // process based on position and operation return on mouse do on_mouse inkey(0,"M")
Products
Recital Mirage Server, Recital Terminal Developer