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


ICommandBars Interface (ArcObjects .NET 10.5 SDK)
ArcObjects Library Reference (Framework)  

ICommandBars Interface

Provides access to members that work on the collection of commandbars.

Product Availability

Available with ArcGIS Desktop.

When To Use

CommandBars is a collection of all the toolbars available to a document. The ICommandBars interface allows you to set properties for all the commandbars and to create, find, or hide commandbars. Use IDocument::CommandBars to get a reference to the commandbars collection.

Members

Description
Method Create Creates a new blank toolbar or shortcut menu.
Method Find Searches for the item specified by identifier.
Method HideAllToolbars Hides all visible bars.
Read/write property LargeIcons Indicates if large icons should be shown.
Read/write property ShowToolTips Indicates if tooltips should be shown.

CoClasses that implement ICommandBars

CoClasses and Classes Description
CommandBars CommandBars collection object.

Remarks

Note, all programmatic customizations are temporary. If you execute VBA code to create a new commandbar, these changes are temporary. If you programmatically customize ArcMap, these changes will only appear while the current document is open in the current ArcMap session. Programmatic changes are never saved in the document or templates. Once you close that document or shutdown ArcMap, the changes are removed. If you are customizing ArcCatalog, these changes will only appear during the current ArcCatalog session.

See Also

IDocument.CommandBars Property

.NET Snippets

Get Command by Name | List ArcMap Visible Toolbars | Create Context Menu | Find Command and Execute | Set Tool Active in ToolBar | Get Command on Toolbar by Names | Get Toolbar by Name

.NET Samples

Custom subtyped command and tool (Code Files: ZoomInCommands) | Applying user interface customizations at startup (Code Files: AcmeExt) | Simple logging dockable window with a custom context menu (Code Files: LoggingDockableWindow)

.NET Related Topics

How to create multiple commands or tools in a single class subtyped command