Difference between revisions of "ON MOUSE"

From Recital Documentation Wiki
Jump to: navigation, search
(Class)
Line 1: Line 1:
==Class==
 
Screen Forms
 
  
  

Revision as of 13:46, 26 October 2009


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