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


IToolbarControl2 Interface (ArcObjects .NET 10.5 SDK)
ArcObjects Library Reference (Controls)  

IToolbarControl2 Interface

Provides access to members that control the ToolbarControl.

Product Availability

Available with ArcGIS Engine.

Description

The IToolbarControl2 interface provides additional members for tasks related to the ToolbarControl, such as setting appearance properties, showing any hidden items on a hidden items menu, and saving and loading the contents of the ToolbarControl.

Members

Description
Method AboutBox Displays a dialog of information about the ToolbarControl.
Method AboutBox Displays a dialog of information about the ToolbarControl.
Method AddItem Adds an item to the ToolbarControl.
Method AddItem Adds an item to the ToolbarControl.
Method AddMenuItem Adds a menu item to the ToolbarControl.
Method AddMenuItem Adds a menu item to the ToolbarControl.
Method AddToolbarDef Appends the contents of the toolbar definition, specified by Guid or ToolbarDef, to the toolbar control.
Method AddToolbarDef Appends the contents of the toolbar definition, specified by Guid or ToolbarDef, to the toolbar control.
Read/write property AlignLeft Indicates if the ToolbarControl displays menu and palette items aligned to the left or right.
Read/write property Appearance The appearance of the ToolbarControl.
Read/write property Appearance The appearance of the ToolbarControl.
Read/write property BackColor Background color of the ToolbarControl.
Read/write property BorderStyle The border style of the ToolbarControl.
Read/write property BorderStyle The border style of the ToolbarControl.
Read-only property Buddy The object that will have its current tool managed by the toolbar.
Read-only property Buddy The object that will have its current tool managed by the toolbar.
Read/write property CommandPool The command pool used by the ToolbarControl to manage command objects. The command pool object maybe shared with other ToolbarControls and ToolbarMenus.
Read/write property CommandPool The command pool used by the ToolbarControl to manage command objects. The command pool object maybe shared with other ToolbarControls and ToolbarMenus.
Read-only property Count The number of items on the ToolbarControl.
Read-only property Count The number of items on the ToolbarControl.
Read/write property CurrentTool The current tool of the buddy.
Read/write property CurrentTool The current tool of the buddy.
Read/write property Customize Indicates if the ToolbarControl is in customize mode.
Read/write property Customize Indicates if the ToolbarControl is in customize mode.
Read/write property CustomProperty A property to associate data with a control.
Read/write property CustomProperty A property to associate data with a control.
Read/write property Enabled Indicates whether the ToolbarControl can respond to user generated events.
Read/write property Enabled Indicates whether the ToolbarControl can respond to user generated events.
Read/write property FadeColor Background fade color of the ToolbarControl.
Read/write property FillDirection The fill direction of the ToolbarControl background color.
Method Find Returns the index of the first item containing the given command, menu or palette. Returns -1 if the command is not found.
Method Find Returns the index of the first item containing the given command, menu or palette. Returns -1 if the command is not found.
Method GetItem Returns the item at the specified index from the ToolbarControl.
Method GetItem Returns the item at the specified index from the ToolbarControl.
Method GetItemRect Returns the dimensions of the item at the specified index.
Method GetItemRect Returns the dimensions of the item at the specified index.
Method HitTest Returns the index of the item at the specified x and y coordinates.
Method HitTest Returns the index of the item at the specified x and y coordinates.
Read-only property hWnd Handle to the window associated with the ToolbarControl.
Read-only property hWnd Handle to the window associated with the ToolbarControl.
Read/write property IconSize The size in pixels of icons displayed on the ToolbarControl.
Read/write property ItemAppearance The appearance of the items on the ToolbarControl.
Read/write property ItemAppearance The appearance of the items on the ToolbarControl.
Read/write property KeyIntercept A property that specifies interception of key strokes that are normally handled by the container. When intercepted the OnKeyDown and OnKeyUp events will be called. This value can be a combined bit mask of esriKeyIntercept enum values.
Read/write property KeyIntercept A property that specifies interception of key strokes that are normally handled by the container. When intercepted the OnKeyDown and OnKeyUp events will be called. This value can be a combined bit mask of esriKeyIntercept enum values.
Read/write property LargeIcons Indicates if large icons are shown on all items on the ToolbarControl.
Read/write property LargeIcons Indicates if large icons are shown on all items on the ToolbarControl.
Method LoadItems Loads items into the ToolbarControl from a previously saved stream.
Read/write property MenuTracking Indicates if menu tracking is enabled on the ToolbarControl.
Read/write property MenuTracking Indicates if menu tracking is enabled on the ToolbarControl.
Read/write property MouseIcon Custom mouse icon used if MousePointer is 99.
Read/write property MouseIcon Custom mouse icon used if MousePointer is 99.
Read/write property MousePointer The mouse pointer displayed over the ToolbarControl.
Read/write property MousePointer The mouse pointer displayed over the ToolbarControl.
Method MoveItem Moves an item from one index to another.
Method MoveItem Moves an item from one index to another.
Read-only property Object A property that returns the underlying control. This can be used when the control is inside a wrapper object that has been added by a development environment.
Read-only property Object A property that returns the underlying control. This can be used when the control is inside a wrapper object that has been added by a development environment.
Read/write property OperationStack The operation stack used for undo and redo functionality. If present commands can use it to store operations.
Read/write property OperationStack The operation stack used for undo and redo functionality. If present commands can use it to store operations.
Read/write property Orientation Indicates if the ToolbarControl is horizontally or vertically aligned.
Method Remove Removes the item at the specified index from the ToolbarControl.
Method Remove Removes the item at the specified index from the ToolbarControl.
Method RemoveAll Removes all items from the ToolbarControl.
Method RemoveAll Removes all items from the ToolbarControl.
Method SaveItems Saves the ToolbarControl items into a stream.
Method SetBuddyControl Sets a control to be a buddy of the toolbar, this control must support IToolbarBuddy.
Method SetBuddyControl Sets a control to be a buddy of the toolbar, this control must support IToolbarBuddy.
Read/write property ShowHiddenItems Indicates if the ToolbarControl has a hidden items menu containing items currently not visible.
Read/write property TextAlignment The caption placement for all items on the ToolbarControl.
Read/write property TextAlignment The caption placement for all items on the ToolbarControl.
Read/write property ThemedDrawing Indicates if the ToolbarControl uses themed drawing.
Read/write property ToolTips Indicates if the items tooltips are shown.
Read/write property ToolTips Indicates if the items tooltips are shown.
Read/write property Transparent Indicates if the ToolbarControl has a transparent background.
Method Update Updates the enabled state of the specified item or all items if an index of -1 is specified. Specify fullUpdate to update the group, group spacing, style and bitmap properties.
Method Update Updates the enabled state of the specified item or all items if an index of -1 is specified. Specify fullUpdate to update the group, group spacing, style and bitmap properties.
Read/write property UpdateInterval The frequency in millisecs that update method is called on the ToolbarControl.
Read/write property UpdateInterval The frequency in millisecs that update method is called on the ToolbarControl.

CoClasses that implement IToolbarControl2

CoClasses and Classes Description
ToolbarControl Esri ToolbarControl
[C#]

When querying interface to IToolbarControl2 in Visual Basic .NET or Visual C# .NET the Object property or container specific code must be used. This is because .NET contains the real control inside a wrapper object known as an host.

IToolbarControl2 toolbarControl=axToolbarControl1.Object as IToolbarControl2;

[Visual Basic .NET]

When querying interface to IToolbarControl2 in Visual Basic .NET or Visual C# .NET the Object property or container specific code must be used. This is because .NET contains the real control inside a wrapper object known as an host.

Dim toolbarControl As IToolbarControl2=AxToolbarControl1.Object

.NET Snippets

Save ToolbarControl Items to File | Load ToolbarControl Items from File

.NET Samples

Editing using a custom form (Code Files: EditorForm) | Dynamic biking (Code Files: BikingTrackModeCmd DynamicBikingSpeedCmd) | Tabbed feature inspector (Code Files: AttachTabbedInspectorExtensionCommand) | GraphicTracker with the map (Code Files: AddGT SelectGT) | Implementing a property page for an ArcGIS Engine application (Code Files: FeatureLayerSymbology)

.NET Related Topics

How to save ToolbarControl items to a settings file