WebMenuItem.Text

From Xojo Documentation

Property (As String )
aWebMenuItem.Text = newStringValue
or
StringValue = aWebMenuItem.Text

New in 2011r2

Supported for all project types and targets.

The text of the menu item. Use "-" to create a separator.

Note

You can also use the constructor to assign the text when creating the menu item:

Var m As New WebMenuItem("Load")

Example

Create a menu to display when right-clicking on a label. This code is in the Shown event handler of a WebLabel:

Var base As New WebMenuItem

Var childMenu As WebMenuItem

childMenu = New WebMenuItem
childMenu.Text = "Load"
base.Append(childMenu)

childMenu = New WebMenuItem
childMenu.Text = "Save"
base.Append(childMenu)

Me.ContextualMenu = base