GefContextMenuItem.Checked (property)

Gets and sets if the menu item is checked
Syntax: Boolean = object.Checked
object.Checked = Boolean
Description: The Checked property gets and sets if the menu will be have a check appear beside it. The default value is False. If the menu item is a native command it is not affected by by this property. The native commands maintain their own check according to the application state.


Sub OnPreContextMenu(oContextMenu As GefContextMenu)
  Dim oContextMenuItem As GefContextMenuItem
  Dim oMenuItems As GefContextMenuItems
  Set oMenuItems = oContextMenu.MenuItems
  Set oContextMenuItem = oMenuItems.Add
  oContextMenuItem.Text = "Custom procedure menu items"
  Dim oSubMenu As GefContextMenu
  Set oSubMenu = oContextMenuItem.SubMenu
  Dim oSubMenuItem As GefContextMenuItem
  Set oSubMenuItem = oSubMenu.MenuItems.Add
  oSubMenuItem.SetActionToProcedure "OnMyProcMenu1"
  oSubMenuItem.Text = "OnMyMenu1"
  oSubMenuItem.Checked = True
  oSubMenuItem.Translated = False
End Sub