RectControl.ContextualMenuAction

From Xojo Documentation
Jump to: navigation, search
Event


RectControl.ContextualMenuAction(hitItem as MenuItem) As Boolean

New in 2005r1

Fires when a contextual menuitem hitItem was selected but the Action event and the MenuHandler for the menuitem did not handle the menu selection.

Notes

This event gives you a chance to handle the menu selection by inspecting the menuitem's Text or Tag properties to see which item was selected. Use this in conjunction with ConstructContextualMenu if you have not specified the Action event or the Menu Handler for the items on the contextual menu. See the example of a contextual menu in the examples for the RectControl class.

Example

This simple event handler displays the text of the selected menu item.

If hitItem <> Nil Then MsgBox(hitItem.Text)

Return true

A more fine-grained event handler would compare the value of hitItem to all the expected values and take different actions depending on its value.

Personal tools
Namespaces

Variants
Actions
Main
Content
Starting Out
Dig Deeper
More Help
Toolbox
About