Product Logo

CNS Menu

Dynamic Menus

XML

submenu Tag

Namesubmenu Tag
Description

This tag defines a submenu of the current menu. You can use this tag to create hierarchal menus. You need to define at least the name attribute to have a valid <submenu> tag. This tag can contain <menuitem>, <submenu>, and <insertmenu> tags.

Format
<submenu name=“submenu name” defaultdb=“mydb” defaultscript=“myscript” defaultvalue=“47” enabled=“yes” groupid=“abc” modifierkeys=“shift+ctrl” style=“bold” defaultbgcolor=“#FFFF00” defaultfgcolor=“#000” bgcolor=“#FFFF00” fgcolor=“#000” />
Required Attributes
  • name
    Defines the name of this submenu. This name appears on the parent menu where the submenu cascades from the parent menu.
Optional Attributes
  • defaultdb
    Defines the default database for all the menu items contained in this submenu. If you do not specify a database when defining a sub menu item, this default database will be used. The default value is “”.
  • defaultscript
    Defines the default script for all the menu items contained in this submenu. If you do not specify a script when defining a sub menu item, this default script will be used. The default value is “”.
  • defaultvalue
    Defines the default value for all the menu items contained in this submenu. If you do not specify a value when defining a submenu item, this default value will be used. The default value is “”.
  • enabled
    Defines whether or not this submenu is enabled. Specify either “yes” or “no”. If the submenu is disabled, it will appear greyed and the submenu will not appear when the user places their cursor over it. The default value is “yes”.
  • groupid
    Defines a user-supplied group identifier for this submenu. This is used in conjunction with the modifierkeys attribute to selectively show alternative menu items depending on which modifier keys are held down. See the Hidden Items Example in the CNS Menu example database for examples that use this attribute. The default value is “”.
  • modifierkeys
    Defines the modifier keys that are required in order to show this submenu. Specify “none” or “shift”, “ctrl”, “opt”, “cmd”, or combinations using the plus sign (“shift+ctrl+cmd”). If the specified modifier keys are not held down when this menu is shown, this submenu will not be shown. If you are making a cross-platform solution, you will only want to use the “ctrl” and “shift” modifier keys because windows does not have the “opt” and “cmd” keys. The default value is “none”.
  • style
    Defines the font style of this submenu. Specify “none” or “bold”, “italic”, “underline”, or combinations using the plus sign (“bold+italic”). The default value is “none”.
  • defaultbgcolor
    Defines the default background color of items on the submenu. See the menuitem Tag for an explanation of how to define the color. The default color is defined by the system.
  • defaultfgcolor
    Defines the foreground/font color of items on the submenu. See the menuitem Tag for an explanation of how to define the color. The default color is defined by the system.
  • bgcolor
    Defines the background color of the submenu name that appears on the main menu. See the menuitem Tag for an explanation of how to define the color. The default color is defined by the system.
  • fgcolor
    Defines the foreground/font color of the submenu name that appears on the main menu. See the menuitem Tag for an explanation of how to define the color. The default color is defined by the system.