Document revision: 2024-05-27
Refers to JDLG version: 2.0.18
The common contextmenu
attribute allows to specify the path
of a Menu object that is opened at
the mouse position when the context
menu mouse button is clicked.
The Menu object may be located in
the current or another Dialog, for
example in a model.
An invalid Menu object
path has no effect.
The common rmbmask attribute allows
to separately define the context menu mouse button for each
object. By default this is the right mouse button, but
rmbmask may for example be used to
specify that a StaticText context
menu is opened when any mouse button is clicked.
When pressing the context menu mouse
button, the following behavior applies:
- If the object under the mouse cursor specifies a
contextmenu, the context
menu is opened. When the context menu is completed, DLG DO may
return, depending on the selected menu item.
The returned path specifies the
object under the mouse cursor when the context menu was opened.
- If the object under the mouse cursor does not specify a
contextmenu, the further
behavior depends on the object type.
This applies to objects of all classes, including those that do not
act upon a mouse click or never return a rule value, for example
StaticText objects.
Note: Pressing the context
menu mouse button does not change the
focus object.
When selecting an entry in the context menu that specifies a nonzero
rule value, DLG DO returns with
this value and the path of the object
under the mouse cursor when the context menu was opened.
If the selected menu item has a zero
rule value, DLG DO will not
return.
Any MenuItem status change
(checked, radio item selected) is preserved, i.e., may be set
before or queried after the context menu is displayed.
|