Setting ToolbarControl properties
Do the following to set ToolbarControl properties:
- Create an ArcGIS Engine project in the Eclipse IDE using the ToolbarControl. For more information, see How to build an application in Eclipse using visual beans. The following screen shot shows an example JFrame in design mode:
- Right-click the ESRI ToolbarControl and click Customize Java Bean. The Java Property Editor dialog box appears. The visual properties of the ToolbarControl, such as border style, appearance, and mouse pointer can be set using the Java Property Editor. See the following screen shot:
- On the Java Property Editor dialog box, click the General tab. The following table explains the other areas that can be selected under the General tab:LabelsToolbarControl methodsDescriptionDefault valueEnabledIndicates whether the ToolbarControl can respond to user generated events.TrueArrow Key InterceptA property that specifies interception of key strokes that are normally handled by the container. When intercepted, the OnKeyDown and OnKeyUp events will be called.0
- The Java Property Editor dialog box is also used to add command items to the ToolbarControl during design time. Do the following to set the properties on the Java Property Editor dialog box for the ToolbarControl:
- Click the Items tab on the Java Property Editor dialog box. See the following screen shot:
- Click Add on the preceding Java Property Editor dialog box. The Controls Commands dialog box appears. The Controls Commands dialog box shows a Commands tab, which lists out-of-the-box standard categories and commands. See the following screen shot:
- On the preceding Controls Commands dialog box, click the appropriate command or commands, then click Add Command. Click Close after the command items are added. The commands are added to the Java Property Editor dialog box under the Items tab. See the following screen shot:
- The Remove All button on the preceding Java Property Editor dialog box removes all added command items together. Other properties of the ToolbarControl, such as item appearance, text alignment, and update interval can be set. Update interval determines the frequency in milliseconds in which the update method is called on the ToolbarControl. The following table explains the other areas that can be selected under the Items tab:LabelToolbarControl methodsDescriptionDefault valueLarge IconShows large icons for all items on the ToolbarControl.FalseTooltipsShows ToolTips.TrueMenuTrackingEnables menu tracking on the ToolbarControl.False
Right-click a command item to delete or modify individual commands, such as the following Style and Begin Group:
Style—Determines how command items show on the toolbar, such as Text Only (command name), Image Only (command icon), or Image and Text (command icon and name). By default, the Style property is set to Image Only.
Begin Group—Determines if a separator shows before the command item. By default, the Begin Group Property is set to false.
See the following screen shot:
The TOCControl properties can be modified using the Java Property Editor and Properties window in the Eclipse IDE.
See Also:ToolbarControl class
Toolbar control overview
How to build an application in Eclipse using visual beans
|Development licensing||Deployment licensing|
|Engine Developer Kit||Engine|
|ArcGIS for Desktop Basic|
|ArcGIS for Desktop Standard|
|ArcGIS for Desktop Advanced|