Syntax 1: For controls and windows, except RichTextEdit
Description
For a window, occurs when the right mouse button is pressed in an
unoccupied area of the window (any area with no visible, enabled
object). The window event will occur if the cursor is over an invisible
or disabled control.
For a control, occurs when the right mouse button is pressed on
the control.
Event ID
|
Event ID |
Objects |
|---|---|
|
pbm_rbuttondown |
Windows and controls that can be placed on a |
Arguments
|
Argument |
Description |
|---|---|
|
flags |
UnsignedLong by value (the modifier keys and mouse Values
In the RButtonDown event, the right mouse For an explanation of flags, see Syntax 2 of |
|
xpos |
Integer by value (the distance of the pointer from |
|
ypos |
Integer by value (the distance of the pointer from |
Return Values
Long.
Return code choices (specify in a RETURN statement):
0 — Continue processing
Examples
These statements in the RButtonDown script for the window display
a pop-up menu at the cursor position. Menu4 was created in the Menu
painter and includes a menu called m_language. Menu4 is not the menu for
the active window and therefore needs to be created. NewMenu is an
instance of Menu4 (datatype Menu4):
|
1 2 3 |
Menu4 NewMenu NewMenu = CREATE Menu4 NewMenu.m_language.PopMenu(xpos, ypos) |
In a Multiple Document Interface (MDI) application, the arguments
for PopMenu need to specify coordinates relative to the MDI
frame:
|
1 2 |
NewMenu.m_language.PopMenu( & w_frame.PointerX(), w_frame.PointerY()) |
See also