Gets and sets the text of the menu item | |
Syntax: | String =
object.Text object.Text = String |
Description: | The Text property gets and sets the text of
the menu item. For gefMenuItemTypeSeparator this property is not
used. Example: Sub OnMyMenu4 MsgBox "OnMyMenu4" End Sub Sub OnMyMenu3 MsgBox "OnMyMenu3" End Sub Sub OnMyMenu2 MsgBox "OnMyMenu2" End Sub Sub OnPreContextMenu(oContextMenu As
GefContextMenu) Dim oContextMenuItem As
GefContextMenuItem Dim oMenuItems As GefContextMenuItems Set oMenuItems =
oContextMenu.MenuItems oMenuItems.RemoveAll Set oContextMenuItem = oMenuItems.Add oContextMenuItem.SetActionToScript
"OnMyMenu2" oContextMenuItem.Text = "OnMyMenu2" oContextMenuItem.Checked = True Set oContextMenuItem = oMenuItems.Add oContextMenuItem.SetActionToScript
"OnMyMenu3" oContextMenuItem.Text = "OnMyMenu3" oContextMenuItem.Enabled = False Set oContextMenuItem = oMenuItems.Add oContextMenuItem.SetActionToScript
"OnMyMenu4" oContextMenuItem.Text = "OnMyMenu4" End Sub |