Description
Used to define a custom toolbutton or specify a built-in toolbutton in a toolbar.
Diagram
Overview
|
TOOLBUTTON
Used to define a custom toolbutton or specify a built-in toolbutton in a toolbar.
|
command optional xs:string
Built-in tool name (for example, addlayer).
|
|
image optional
Path to a 16X16 .bmp image file, .ico icon file, or the name of a built-in image (for example, $bex).
|
|
name optional xs:string
Custom tool name. Used to reference the tool in scripts.
|
|
shortcut optional xs:string
The function key or action button shortcut for the custom tool button.
|
|
onclick optional
Specify the script to run when this event occurs.
|
|
onpointerdown optional
Specify the script to run when this event occurs.
|
|
onpointermove optional
Specify the script to run when this event occurs.
|
|
onpointerup optional
Specify the script to run when this event occurs.
|
|
prompt optional xs:string
The status bar text for the custom tool button.(desktop only)
|
|
tooltip optional xs:string
Tooltip to display when the mouse pointer is on the custom tool (desktop only).
|
|
Sequence
|
MENUITEM 1..∞
Used to define a custom toolbutton or specify a built-in toolbutton in a pull-down menu.
|
|
|
Attributes
Name | Type | Use | Default | Fixed | Description |
command | xs:string | optional | | | Built-in tool name (for example, addlayer). |
image | | optional | | | Path to a 16X16 .bmp image file, .ico icon file, or the name of a built-in image (for example, $bex). |
name | xs:string | optional | | | Custom tool name. Used to reference the tool in scripts. |
shortcut | xs:string | optional | | | The function key or action button shortcut for the custom tool button. |
onclick | | optional | | | Specify the script to run when this event occurs. |
onpointerdown | | optional | | | Specify the script to run when this event occurs. |
onpointermove | | optional | | | Specify the script to run when this event occurs. |
onpointerup | | optional | | | Specify the script to run when this event occurs. |
prompt | xs:string | optional | | | The status bar text for the custom tool button.(desktop only) |
tooltip | xs:string | optional | | | Tooltip to display when the mouse pointer is on the custom tool (desktop only). |
Remarks
Examples
Applet with one toolbar and no forms |
Copy Code |
<?xml version="1.0" encoding="UTF-8" ?>
<ArcPad>
<APPLET name="MyApplet">
<SYSTEMOBJECTS>
<APPLICATION onstartup="Initialize" />
</SYSTEMOBJECTS>
<TOOLBARS>
<TOOLBAR name="MyApplet" caption="Load Project Data" visible="true">
<TOOLBUTTON name="tlLoadData" onclick="Call LoadData" tooltip="Load Data" prompt="Load data from the default folder" image="load.bmp">
<MENUITEM name="tlSetup" onclick="Call Setup" caption="Setup" />
</TOOLBUTTON>
<TOOLBUTTON command="addlayer" />
</TOOLBAR>
</TOOLBARS>
</APPLET>
<SCRIPT src="MyApplet.vbs" />
</ArcPad>
|
Restrictions
- If command is used, image, name, prompt, tooltip, shortcut, onclick, onpointerdown, onpointermove, and onpointerup cannot also be used.
- If image, name, prompt, tooltip, shortcut, onclick, onpointerdown, onpointermove, or onpointerup is used, command cannot also be used.
Source
<xs:element name="TOOLBUTTON" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:annotation>
<xs:documentation>Used to define a custom toolbutton or specify a built-in toolbutton in a toolbar.</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" ref="MENUITEM" />
</xs:sequence>
<xs:attribute name="command" type="xs:string">
<xs:annotation>
<xs:documentation>Built-in tool name (for example, addlayer).</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="image">
<xs:annotation>
<xs:documentation>Path to a 16X16 .bmp image file, .ico icon file, or the name of a built-in image (for example, $bex).</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="name" type="xs:string">
<xs:annotation>
<xs:documentation>Custom tool name. Used to reference the tool in scripts.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="shortcut" type="xs:string">
<xs:annotation>
<xs:documentation>The function key or action button shortcut for the custom tool button.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="onclick">
<xs:annotation>
<xs:documentation>Specify the script to run when this event occurs.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="onpointerdown">
<xs:annotation>
<xs:documentation>Specify the script to run when this event occurs.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="onpointermove">
<xs:annotation>
<xs:documentation>Specify the script to run when this event occurs.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="onpointerup">
<xs:annotation>
<xs:documentation>Specify the script to run when this event occurs.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="prompt" type="xs:string">
<xs:annotation>
<xs:documentation>The status bar text for the custom tool button.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="tooltip" type="xs:string">
<xs:annotation>
<xs:documentation>Tooltip to display when the mouse pointer is on the custom tool (desktop only).</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
|
See Also