Map Schema
MENUITEM Element
See Also  Send comments on this topic.
Map Schema : MENUITEM Element

Glossary Item Box

Description

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

Diagram

MENUITEM Element

Overview

MENUITEM
Used to define a custom toolbutton or specify a built-in toolbutton in a pull-down menu.Used to define a custom toolbutton or specify a built-in toolbutton in a pull-down menu.
caption optional xs:string
Caption displayed for the custom menu item. Displayed to the right of the image.
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 menu item name. Used to reference the menu item in scripts.
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.
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 menu item.
shortcut optional xs:string
The function key or action button shortcut for the custom menu item.

Attributes

NameTypeUseDefaultFixedDescription
captionxs:stringoptional  Caption displayed for the custom menu item. Displayed to the right of the image.
commandxs:stringoptional  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).
namexs:stringoptional  Custom menu item name. Used to reference the menu item in scripts.
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.
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 menu item.
shortcutxs:stringoptional  The function key or action button shortcut for the custom menu item.

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 name="MENUITEM" 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 pull-down menu.</xs:documentation>
  </xs:annotation>
  <xs:complexType>
    <xs:attribute name="caption" type="xs:string">
      <xs:annotation>
        <xs:documentation>Caption displayed for the custom menu item. Displayed to the right of the image.</xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <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 menu item name. Used to reference the menu item in scripts.</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 default="false" name="promote">
      <xs:annotation>
        <xs:documentation>Specifies whether the custom menu item will be promoted to the top of the list when selected.</xs:documentation>
      </xs:annotation>
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:enumeration value="true" />
          <xs:enumeration value="false" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="prompt" type="xs:string">
      <xs:annotation>
        <xs:documentation>The status bar text for the custom menu item.</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 menu item.</xs:documentation>
      </xs:annotation>
    </xs:attribute>
  </xs:complexType>
</xs:element>

See Also

© 2013 All Rights Reserved.