Represents a context popup menu item. | |
Description: | The GefContextMenuItem object represents a
context popup menu item. The GefContextMenu, GefContextMenuItem, and GefContextMenuItems objects are
only available during the "Before Context
Menu" event, and represent temporary objects to manipulate the
context menu just before it will be displayed. Any changes to the
context menu via these objects will not be persisted from one event
execution to the next. This allows the context menu to be adjusted
every time just before it is displayed. Thus it can adjust to
whatever dynamic conditions are required. Example: Sub OnPreContextMenu(oContextMenu As
GefContextMenu) Dim oContextMenuItem As
GefContextMenuItem Dim oContextMenuItems As
GefContextMenuItems Set oContextMenuItems =
oContextMenu.MenuItems For Each oContextMenuItem in
oContextMenuItems If oContextMenuItem.Type =
gefMenuItemTypePointTarget Then oContextMenuItem.Enabled
= False Else Dim command As
Long If
oContextMenuItem.GetNativeCommandAction(command) Then If command =
gefMenuCommand_ID_EDIT_POINTVIEW Then oContextMenuItem.Enabled
= False End
If End If End If Next oContextMenuItem End Sub |
Properties: | Application , Checked , Enabled , Parent , SubMenu , Text , Translated , Type |
Methods: | GetNativeCommandAction , GetPointTargetAction , GetProcedureAction , GetScriptAction , MakeSeparator , MakeSubmenu , SetActionToNativeCommand , SetActionToPointTarget , SetActionToProcedure , SetActionToScript |