Allow run time customization of the ToolbarControl


PurposeThis sample demonstrates customizing the ToolbarControl at run time. The ToolbarControl is used in conjunction with the MapControl and the control commands. The AddItem method is used to add new items to the ToolbarControl with their style set. The ICustomizeDialogEvents.OnStartDialog event is used to put the ToolbarControl into customize mode, and the ICustomizeDialogEvents.OnCloseDialog event is used to take the ToolbarControl out of customize mode.

How to use

See How to use ArcGIS samples for help on compiling, setting up the debugger, and running the sample. If the sample has associated data, you will find that the sample's zip file includes a "data" folder alongside the language folders. However, you will need to update the sample to point to the location of the data once you have extracted all the files.

  1. Select the Customize check box to enable customization of the ToolbarControl and to open the Customize dialog box.
  2. To move an item, click it, then drag and drop it to the location indicated by the black vertical bar.
  3. To delete an item, click it, then drag it off the ToolbarControl or right-click the item and click Delete from the Customize menu.
  4. To change the group, group spacing, or style of an item, right-click the item to display the Customize menu.
  5. To add a command, menu, and palette items, double-click them in the Customize dialog box or drag and drop them from the Customize dialog box onto the ToolbarControl.

AssemblyInfo.cs Assembly information.
Customization.cs Form file.
Download the C# files
AssemblyInfo.vb Assembly information.
Customization.vb Form file.
Download the VB.NET files

Download the files for all languages

See Also:

ToolbarControl class
IToolbarControl interface
CustomizeDialog class
ICustomizeDialog interface
ICustomizeDialogEvents interface




Development licensing Deployment licensing
Engine Developer Kit Engine Runtime
ArcView
ArcEditor
ArcInfo