Customizing the ArcPad Today plug-in

The ArcPad Today Plug-in is very flexible and can easily be customized to meet your requirements. Some customization options include:

Customizing the ArcPad Today Plug-in is done by creating and editing the ArcPad Today Plug-in configuration file. This XMLformatted configuration file is called ArcPadToday.xml, and must be located in the \My Documents\My ArcPad folder on your Windows Mobile device. A template ArcPadToday.xml configuration file is listed at the end of this chapter.

You can customize the tools that appear in the plug-in from a selection of available tool types as listed below. Each tool type has various additional configuration parameters that further define that tool’s operation. Refer to the notes below for details on what can be customized for each tool type.

There is no technical limit to the number of tools you configure to appear, but you will of course be limited by the width of your screen display. On a typical ¼ VGA, 240 x 320, resolution device in portrait orientation you can comfortably fit six tools. You can fit more tools if you use the device in landscape orientation, but the last couple of tools will not be displayed if you change your device back to portrait orientation.

A typical XML structure of an ArcPadToday.xml configuration file is as follows:

<ArcPadToday>

<CAPTION>… Insert text here …</CAPTION>

<TOOLS> <TOOL type="type" …additional attributes… />

<TOOL type="type" …additional attributes… >

<FILECOPY source="filepath"

destination="filepath"/>

</TOOL>

</TOOLS>

</ArcPadToday>

Caption

The caption is the text displayed at the bottom of the ArcPad Today Plug-in toolbar. ArcPad scripts can access this area and modify the caption.

For example, the following ArcPad script code snippet will display the caption “Hello from ArcPad” at the bottom of the toolbar:

Dim hWnd

hWnd = System.FindWindow("ArcPadToday",,true) Call System.SetWindowText(hWnd, “Hello From ArcPad”)

Tool types

The following tool types are supported:

Tool type attributes

Tool types can have the following attributes:

Icon images

Icon images can be in either .BMP or .GIF formats. For ¼ VGA devices, which includes most Windows Mobile devices, the image icon should be 32 x 32 pixels. On VGA devices the image icon should be 64 x 64 pixels.

File dependencies

The ‘arcpad’, ‘script’, and ‘event’ tool types can have dependant files, specified by nested <FILECOPY> elements.

Each <FILECOPY> element specifies a file to be copied from the source filename to the destination filename before ArcPad is started.

The <FILECOPY> element can be used to copy application specific ArcPad preference and configuration files to be used by ArcPad when it starts. For example:

<TOOL type="arcpad">

<FILECOPY source="\Storage

Card\ArcPadPrefs.apx"

destination="\My Documents\My ArcPad\ArcPadPrefs.apx"/>

</TOOL>

Color attributes

The battery, memory, and storage tools have the option of specifying the colors for the bar displayed at the bottom of each tool. The available color attributes are :

Colors can be specified as:

The following example shows the use of color names:

<TOOL type="battery" emptycolor=”BlueViolet” fullcolor=”Charteuse”/>

Valid color names include the HTML color names, as well as the extended, or X11 color names. The following website lists the HTML and X11 color names:

http://en.wikipedia.org/wiki/Web_colors

In practice, it is safer to use RGB values for colors.


2/6/2013