This document is archived and information here might be outdated.  Recommended version.


IToolbarMenu2 Interface (ArcObjects .NET 10.4 SDK)
ArcObjects Library Reference (Controls)  

IToolbarMenu2 Interface

Provides access to members that control ToolbarControl menu items.

Product Availability

Available with ArcGIS Engine.

Description

The IToolbarMenu2 interface provides additional members for tasks related to the apperance of standalone ToolbarMenu objects. The AddMultiItem method allows MultiItem objects to be added to both standalone ToolbarMenu's and ToollbarMenu's on a ToolbarControl.

Members

Description
Method AddItem Adds an item to the ToolbarMenu.
Method AddMultiItem Adds a multi-item to the ToolbarMenu.
Method AddSubMenu Adds a sub-menu to the ToolbarMenu.
Read/write property AlignLeft Indicates if the ToolbarMenu displays aligned to the left or right.
Read/write property Bitmap The bitmap that is used as the icon on this ToolbarMenu.
Read/write property Caption The caption used by the ToolbarMenu.
Read/write property CommandPool The CommandPool used by the ToolbarMenu.
Read-only property Count The number of items on the ToolbarMenu.
Read/write property Customize Indicates if the ToolbarMenu is in customize mode.
Method Find Returns the index of the first item containing the given command or menu. Returns -1 if it is not found.
Method GetItem Returns the item at the specified index from the ToolbarMenu.
Method GetMenuDef Returns the menu definition, this method is obsolete.
Read-only property Hook The object that is passed as a hook to the OnCreate event of each item's command.
Read/write property IconSize The size in pixels of icons displayed on the ToolbarMenu.
Read/write property MouseIcon Custom mouse icon used if MousePointer is 99.
Read/write property MousePointer The mouse pointer displayed over the ToolbarMenu.
Method MoveItem Moves an item from one index to another.
Method PopupMenu Pops up the menu at the position specified.
Method Remove Removes the item at the specified index from the ToolbarMenu.
Method RemoveAll Removes all items from the ToolbarMenu.
Method SetHook Sets the object that is passed as a hook to the OnCreate event of each item's command.
Read/write property ThemedDrawing Indicates if the ToolbarMenu uses themed drawing.

Inherited Interfaces

Interfaces Description
IToolbarMenu Provides access to members that control ToolbarControl menu items.

CoClasses that implement IToolbarMenu2

CoClasses and Classes Description
ToolbarMenu A menu containing commands that can be used from a ToolbarControl or as a popup menu.

.NET Samples

Add a custom bookmarks MultiItem to the ToolbarControl (Code Files: MultiItemBookmarks) | Implementing a property page for an ArcGIS Engine application (Code Files: TocContextMenuClass) | Save a layer file in a MapControl application (Code Files: ContextMenuClass) | Configure a command for a specific locale (Code Files: CulturalResources)

.NET Related Topics

How to add a context menu using the Visual Studio Integration tools