Difference between revisions of "ON MOUSE"

From Recital Documentation Wiki
Jump to: navigation, search
 
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
=ON MOUSE=
 
 
 
==Class==
 
Mirage Forms
 
 
 
 
==Purpose==
 
==Purpose==
 
Execute a command when a menu operation occurs
 
Execute a command when a menu operation occurs
Line 15: Line 8:
  
 
==See Also==
 
==See Also==
[[INKEY()]], [[LASTKEY()]], [[MCOL()]], [[MROW()]]
+
[[INKEY()]], [[ISMOUSE()]], [[LASTKEY()]], [[MCOL()]], [[MROW()]]
  
  
Line 29: Line 22:
 
<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 41: Line 34:
  
 
==Products==
 
==Products==
Recital Mirage Server, Recital Terminal Developer
+
Recital  
 
[[Category:Documentation]]
 
[[Category:Documentation]]
 
[[Category:Commands]]
 
[[Category:Commands]]
 +
[[Category:Screen Forms]]
 +
[[Category:Screen Forms Functions]]

Latest revision as of 15:46, 12 November 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