Customize toolbar

This sample demonstrates how to customize the Toolbar control at run time. In this sample, the Toolbar control is used in conjunction with the Map control and the control commands. The AddItem method is used in the Form_Load event to add new items to the Toolbar control with their style set. The Customize method is used to determine whether the Toolbar control can be customized at run time.

How to use

See How to use ArcGIS samples for help on running the sample.

  1. Start the CustomizeToolbar application.
  2. Click the Open File button and browse your file system for a map document to work with.
  3. Check the Customize Toolbar check box to enable customization of the toolbar.
  4. To move a toolbar item, select it with the mouse pointer and drag and drop it at the location indicated by the black vertical bar, which is activated during this operation.
  5. To delete an item, either select it by pressing the left mouse button and dragging it off the Toolbar control or select it with the right mouse button and choose Delete from the Customize menu.
  6. To change the group, group spacing, or style of an item, select it by pressing the right mouse button to display the Customize menu.

If you installed the samples feature, you will find the files associated with this sample in <Your Developer Kit install location>\DeveloperKit10.4\Java\Samples\ArcObjects.

toolbarbean/ Main class

Development licensing Deployment licensing
Engine Developer Kit Engine
ArcGIS for Desktop Basic
ArcGIS for Desktop Standard
ArcGIS for Desktop Advanced