Difference between revisions of "IsContextualClick"

From Xojo Documentation

(See Also)
(Notes)
 
Line 31: Line 31:
 
Generally speaking, if you want to show a contextual menu, you should use the [[RectControl.ConstructContextualMenu | ConstructContextualMenu]] and [[RectControl.ContextualMenuAction | ContextualMenuAction ]] events to row contextual menus.
 
Generally speaking, if you want to show a contextual menu, you should use the [[RectControl.ConstructContextualMenu | ConstructContextualMenu]] and [[RectControl.ContextualMenuAction | ContextualMenuAction ]] events to row contextual menus.
  
IsContextualClick is useful in the [[MouseDown_event | MouseDown]] event to check for a contextual click when you are not intending to display a menu.
+
IsContextualClick is useful in the MouseDown event to check for a contextual click when you are not intending to display a menu.
  
 
==Examples==
 
==Examples==

Latest revision as of 20:18, 13 August 2021


Method

Indicates if the contextual mouse button has been clicked. It is True if the contextual button has been clicked and False if not.

Syntax

result=IsContextualClick

Part Type Description
result Boolean True if the contextual mouse button has been clicked and False if it was not.

Notes

A contextual click varies depending on platform and user settings. Most often it is done by right-clicking the mouse. On macOS, a contextual click is also triggered by holding the control key down while left clicking.

Generally speaking, if you want to show a contextual menu, you should use the ConstructContextualMenu and ContextualMenuAction events to row contextual menus.

IsContextualClick is useful in the MouseDown event to check for a contextual click when you are not intending to display a menu.

Examples

To display an existing menu, you should use the Clone method as in this example:

If IsContextualClick Then
Var m As MenuItem
m = EditMenu.Clone.PopUp
End If

See Also

MenuItem, ConstructContextualMenu, ContextualMenuAction