GefContextMenuItems.RemoveAll (method)

Removes all the menu items from the menu.
Syntax: object.RemoveAll
Description: Removes all the menu items from the context menu.


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
  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