ArcPad Map File Schema
MENUITEM Element
See Also  Send comments on this topic.
ArcPad Map File Schema > TOOLBAR Element > TOOLBUTTON Element : MENUITEM Element

Glossary Item Box

Description

Used to define a custom toolbutton or specify a built-in toolbutton in a pull-down menu.

Diagram

MENUITEM Element

Overview

MENUITEM 1..∞
Used to define a custom toolbutton or specify a built-in toolbutton in a pull-down menu.
caption optional xs:string
Displayed in the toolbar.
command optional xs:string

When parent is ToolButton:

 Built-in tool name (for example, addlayer).

image optional xs:string
Path to a 16X16 .bmp image file, .ico file or the name of a built-in image (for example, $bex).
name optional xs:string

When parent is ToolButton:

Custom tool name. Used to reference the tool in scripts.

onclick optional xs:string
Specify the script to run when this event occurs.
onpointerdown optional xs:string
Specify the script to run when this event occurs.
onpointermove optional xs:string
Specify the script to run when this event occurs.
onpointerup optional xs:string
Specify the script to run when this event occurs.
promote optional Restriction of xs:string
Specifies whether the custom menu item will be promoted to the top of the list when selected.
prompt optional xs:string

The status bar text for the custom tool button.

shortcut optional xs:string

The function key or action button shortcut for the custom tool button.

Attributes

NameTypeUseDefaultFixedDescription
captionxs:stringoptional  Displayed in the toolbar.
commandxs:stringoptional  

When parent is ToolButton:

 Built-in tool name (for example, addlayer).

imagexs:stringoptional  Path to a 16X16 .bmp image file, .ico file or the name of a built-in image (for example, $bex).
namexs:stringoptional  

When parent is ToolButton:

Custom tool name. Used to reference the tool in scripts.

onclickxs:stringoptional  Specify the script to run when this event occurs.
onpointerdownxs:stringoptional  Specify the script to run when this event occurs.
onpointermovexs:stringoptional  Specify the script to run when this event occurs.
onpointerupxs:stringoptional  Specify the script to run when this event occurs.
promoteRestriction of xs:stringoptionalfalse Specifies whether the custom menu item will be promoted to the top of the list when selected.
promptxs:stringoptional  

The status bar text for the custom tool button.

shortcutxs:stringoptional  

The function key or action button shortcut for the custom tool button.

Remarks

  • Use command to specify a built-in tool.
  • Use caption, image, name, promote, prompt, and shortcut to specify a user-defined tool and onclick, onpointerdown, onpointermove, and onpointerup to handle events associated with the user-defined tool.

Examples

Restrictions

  • If command is used, caption, image, name, promote, prompt, shortcut, onclick, onpointerdown, onpointermove, and onpointerup cannot also be used.
  • If caption, image, name, promote, prompt, shortcut, onclick, onpointerdown, onpointermove, or onpointerup is used, command cannot also be used.

Source

<xs:element maxOccurs="unbounded" name="MENUITEM" xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:complexType>
    <xs:attribute ref="caption" />
    <xs:attribute ref="command" />
    <xs:attribute ref="image" />
    <xs:attribute ref="name" />
    <xs:attribute ref="onclick" />
    <xs:attribute ref="onpointerdown" />
    <xs:attribute ref="onpointermove" />
    <xs:attribute ref="onpointerup" />
    <xs:attribute default="false" name="promote">
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:enumeration value="true" />
          <xs:enumeration value="false" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute ref="prompt" />
    <xs:attribute ref="shortcut" />
  </xs:complexType>
</xs:element>

See Also

© 2012 All Rights Reserved.