WebControl.ContextualMenuAction
From Xojo Documentation
Event
WebControl.ContextualMenuAction(Item as WebMenuItem)
New in 2011r2
Supported for all project types and targets.
New in 2011r2
Supported for all project types and targets.
Called when a contextual menu item is selected. This selected item is contained in Item.
Example
This example populates a contextual menu in the Open event of a WebToolbar:
Var menu As New WebMenuItem
menu.Append(New WebMenuItem("One"))
menu.Append(New WebMenuItem("Two"))
menu.Append(New WebMenuItem("Three"))
Me.ContextualMenu = menu
menu.Append(New WebMenuItem("One"))
menu.Append(New WebMenuItem("Two"))
menu.Append(New WebMenuItem("Three"))
Me.ContextualMenu = menu
The menu selection will be handled in the ContextualMenuAction event when the user right-clicks on the control. For example, it can be of the form:
Select case item.Text
Case "One"
MessageBox("One")
Case "Two"
MessageBox("Two")
Case "Three"
MessageBox("Three")
End Select
Case "One"
MessageBox("One")
Case "Two"
MessageBox("Two")
Case "Three"
MessageBox("Three")
End Select
There are equivalent events and properties for managing contextual menus on WebPage as well.