Sets the Enabled attribute of the specified menu item on the specified menu.
Visual Basic |
---|
Public Sub MenuSetItemEnabled( _ ByVal Menu As enumMenu, _ ByVal Tool As enumIXTool, _ ByVal TopMenuID As Long, _ ByVal SubMenuID As Long, _ ByVal bEnabled As Boolean, _ ByVal bExclusive As Boolean _ ) |
- Menu
Value Description Menu_Context Context menu activated. Menu_Toolbar Toolbar menu activated. When menu type is Menu_Toolbar, then the tool parameter is the Tool ID associated with the menu.
When menu type is Menu_Context, then the tool parameter has no meaning and can be any value.
- Tool
An enumIXtool enumeration.Value Description TOOL_Hand Image panning tool. TOOL_Mag Magnifying window. TOOL_MouseWheelHorizScroll Mouse wheel horizontal scroll. TOOL_MouseWheelVertScroll Mouse wheel vertical scroll. TOOL_MouseWheelZoom Mouse wheel zoom. TOOL_None No tool selected. TOOL_Pan Image viewing pan tool. TOOL_Select Rubberband window selection tool. TOOL_ZoomIn Zoom in tool. TOOL_ZoomOut Zoom out tool. TOOL_ZoomRect Zoom rectangle tool. - TopMenuID
- Top-level menu ID.
- SubMenuID
- Sub-level menu ID. If the menu item is to be a top-level menu item then the subMenuID should be 0.
- bEnabled
- Indicates whether to enable or disable (gray) the item.
- bExclusive
- If True, and bEnabled is True, the method disables all other items on the same menu level.
A menu ID of 4100-4200 is reserved for menu separator bars and will not have a enabled state.
Indicates whether the menu item should be displayed or hidden. If the item is specified to be visible and exclusive, all other items on the same menu level are hidden.
Note: The Toolbar must be activated before any context menus can be modified.