Configure the Context Menu

The Context Menu in the SuperMap iDesktopX Application interface can be configured through the < contextMenu >.. tag. A < contextMenu >.. tag corresponds to a Context Menu, The configuration of the Context Menu in a Config File is placed between the < contextMenu >.. tags. The following details the meaning and function of each attribute of the < contextMenu >.. tag.

图片

<contextMenu id="SuperMap.Desktop._FormMap.FormMapContextMenu" index="12" label="Map Window_Map">
        <group id="MapOutput" index="2" label="Save and Output" visible="true">
            <button checkState="false" image="../resources/MapView/Toolbar/MapOperator/GenerateMapCache.png" index="5" 
                    label="Generate Map Tiles (Single-task)..." onAction="CtrlActionSingleCache" screenTip="" screenTipImage="" 
                    shortcutKey="" visible="true"/>
            <button checkState="false" image="../resources/MapView/Menu/MapOperator/MapCacheBuildMulti.png" index="6" 
                    label="Generate Map Tiles (Multi-task)..." onAction="CtrlActionMultiCache" screenTip="" screenTipImage="" 
                    shortcutKey="" visible="true"/>
            <button checkState="false" image="../resources/MapView/Menu/MapOperator/MapCacheCheck_16.png" index="7" 
                    label="Tile check..." onAction="CtrlActionMapCacheCheck" screenTip="" screenTipImage="" 
                    shortcutKey="" visible="true"/>
        </group>
    </contextMenu>      

The configuration items in the Context Menu and the configuration items in the Ribbon share the same set of configuration labels. However, the group, button, and button Dropdown configurations are temporarily supported here. The items contained in the < group >.. tag are a group. If multiple groups are configured in the Context Menu, a seperator will be automatically added between each group. The meanings and functions of the attributes of the < group >.. tag are as follows:

  • Index: used to sort groups. If there are multiple groups in the Context Menu, each group will determine its sorting order through the value of this attribute.
  • ID: The group supports the Merge of items in multiple different Config Files. Merge is based on the ID. That is to say, we can configure a Context Menu group in the Config File of Plug-in A. Specify an ID, and configure another group of the same Context Menu in Plug-in B, but specify the same ID. When the system displays, the items in the two groups in this Context Menu will be merged together. It is displayed on a group of Context Menu.
  • Visible: Specifies whether the content in the group is visible. When the value of this attribute is true, it means visible, and false means invisible.
  • Label: The title of the control.

Related content

Environment deployment

Engineering template

Plug-in configuration overview

Interface configuration

Ribbon configuration

Config File menu

Configure the status bar

Configure Dock Bars

Attributes