ArcPad toolbar customization
ArcPad supports customization for the following types of toolbars:
- Default toolbars consisting of built-in commands
- Custom toolbars consisting of built-in commands
- Custom toolbars with user-defined commands
Starting at ArcPad 8, you've been able to customize the default toolbars in ArcPad using the ArcPad Toolbar Manager or ArcPad Studio. At ArcPad 10.0.2, the default toolbars are also customizable from within ArcPad.
The ArcPad Toolbar Manager (ArcPad 8) and it successor, the ArcPad Toolbar Editor inside ArcPad (ArcPad 10.0.2), allow you to create or modify a toolbar configuration file (for example, ArcPad.apx etc.) without using ArcPad Studio. See the ArcPad Help for more details on how to use the ArcPad Toolbar Editor to customize default toolbars and create custom toolbars with built-in commands.
In ArcPad Studio, you can create custom toolbars that work within a specific applet or that are always loaded when ArcPad starts. These toolbars can contain a combination of built-in commands and user-defined commands that call custom scripts. You can also hide or display any of the ArcPad toolbars.
You must supply a name for each custom toolbar you create in ArcPad Studio. This name is used by ArcPad to determine if commands from new toolbars are to be combined onto existing toolbars. Each time a new toolbar is loaded into ArcPad, ArcPad checks whether an existing toolbar has the same name. If a toolbar with the same name already exists, the commands from the new toolbar are added to the existing toolbar. If a toolbar with the same name does not exist, the new toolbar is created with all of its commands. This mechanism provides a way to minimize the number of toolbars being created by applets through the use of common names. For example, several applets may include a toolbar called MyToolbar. As a result, the commands from all of these applets will be combined onto a single toolbar. This only applies to custom toolbars; you cannot add new commands to the default toolbars.
Toolbars are loaded into ArcPad as follows: on startup, ArcPad loads any custom toolbars from the default configuration file (ArcPad.apx) and sets the initial visibility state of the default toolbars. As each applet is loaded, its toolbars are then added to the system.
The ArcPad default toolbars are as follows:
- Main toolbar
- Browse toolbar
- Edit toolbar
- QuickCapture toolbar
- Navigation toolbar
You can set the default visibility of these toolbars and remove or add any built-in commands to the contents of each toolbar.
Custom toolbars with built-in commands
If your application only requires a subset of built-in commands on default toolbars, you can create one or more custom toolbars and add the desired built-in commands in the desired order. The visibility of the default toolbars can be turned off and the custom toolbars displayed instead. You can create custom toolbars consisting of only built-in commands in either the ArcPad Toolbar Editor or ArcPad Studio.
Custom toolbars with user-defined commands
In some cases, the ArcPad built-in commands may not provide the functionality you need, or you may want to automate tasks and group several actions into one command. Advanced toolbar commands are created by writing VBScripts and linking them to the events of user-defined commands (for example, the OnClick event). When you interact with a user-defined command, the associated scripts are executed.
The following types of user-defined commands are available:
- Simple commands—Simple commands only have to handle the OnClick event associated with the command. The script handling this event performs an action, then ArcPad resumes control.
- Pointer commands—Pointer commands allow custom handling of pointer events that occur
in the map view. This type of command can handle one or more of
the following events:
- OnPointerDown—Generated when the pointer is touched on the map view.
- OnPointerMove—Generated as the pointer is moving around while still touching the map view.
- OnPointerUp—Generated when the pointer is released from the map view.
As these pointer events are being handled, scripts can retrieve the current pointer coordinates via the system Map object. For example, the pointer coordinates in the current map projection would be retrieved using Map.PointerX and Map.PointerY.
You can only create user-defined commands and put them on a custom toolbar in ArcPad Studio.