WebControl.PresentContextualMenu

From Xojo Documentation

Method

WebControl.PresentContextualMenu()

New in 2011r2

Supported for all project types and targets.

PresentContextualMenu displays the contextual menu assigned to the WebControl.

Notes

By using this method, the user does not need to right+click to trigger the contextual menu. For example, if PresentContextualMenu is called in the MouseEnter event, the contextual menu will display whenever the mouse enters the control.

To use a menu as a contextualmenu, use the ContextualMenu property. The menu will be shown as a contextual menu when the user right-clicks on the WebControl.

Regardless of whether the menu is displayed by right-clicking or by calling PresentContextualMenu, the ContextualMenuAction event handler is called when a menu is selected.

Example

Display the contextual menu attached to a Button:

Button1.PresentContextualMenu

See Also

WebControl.ContextualMenuAction, WebControl.ContextualMenu