AddContextMenuItem
This method adds a new context menu item to the list and returns the value as short.
A context menu created in this way is enabled by the
CreateContextMenu method. (See
CreateContextMenu.) No additional menu items can be added to an existing context menu. It has to be disposed of first by
DisposeContextMenu. (See
DisposeContextMenu.)
Introduced with Arbortext IsoView 1.0.
Syntax
addContextMenuItemipszTitlebEnabled
Parameters:
lpszTitle
Sets the title (text) of the menu item as BSTR.
bEnabled
Defines if the menu item is enabled as boolean.
A menu item containing only a single hyphen ("-") instructs Arbortext IsoView to insert a separator line at this position. A menu item prefixed by an underline ("_") instructs Arbortext IsoView to insert this item as a sub menu item.
document.ivx1.AddContextMenuItem( "Highlight", true );
document.ivx1.AddContextMenuItem( "-", true );
document.ivx1.AddContextMenuItem( "ViewPorts", true );
document.ivx1.AddContextMenuItem( "_Home", true );
document.ivx1.AddContextMenuItem( "_Top", true );
document.ivx1.CreateContextMenu();