Menu data source attributes or properties

Adobe AIR 1.0 and later

Items in the menu data source can specify several XML attributes or object properties that determine how the item is displayed and behaves. The following table lists the attributes you can specify, their data types, their purposes, and how the data source must represent them:

Attribute or property

Type

Description

altKey

Boolean

Specifies whether the Alt key is required as part of the key equivalent for the item.

cmdKey

Boolean

Specifies whether the Command key is required as part of the key equivalent for the item. The defaultKeyEquivalentModifiers field also affects this value.

ctrlKey

Boolean

Specifies whether the Control key is required as part of the key equivalent for the item. The defaultKeyEquivalentModifiers field also affects this value.

defaultKeyEquivalentModifiers

Boolean

Specifies whether the operating system default modifier key (Command for Mac OS X and Control for Windows) is required as part of the key equivalent for the item. If not specified, the MenuBuilder framework treats the item as if the value was true .

enabled

Boolean

Specifies whether the user can select the menu item (true), or not (false). If not specified, the MenuBuilder framework treats the item as if the value was true .

items

Array

(JSON only) specifies that the menu item is itself a menu. The objects in the array are the child menu items contained in the menu.

keyEquivalent

String

Specifies a keyboard character which, when pressed, triggers an event as though the menu item was selected.

If this value is an uppercase character, the shift key is required as part of the key equivalent of the item.

label

String

Specifies the text that appears in the control. This item is used for all menu item types except separator .

mnemonicIndex

Integer

Specifies the index position of the character in the label that is used as the mnemonic for the menu item. Alternatively, you can indicate that a character in the label is the menu item's mnemonic by including an underscore immediately to the left of that character.

onSelect

String or Function

Specifies the name of a function (a String) or a reference to the function (a Function object). The specified function is called as an event listener when the user selects the menu item. For more information see Handling MenuBuilder menu events .

shiftKey

String

Specifies whether the Shift key is required as part of the key equivalent for the item.

Alternatively, the keyEquivalent value specifies this value as well. If the keyEquivalent value is an uppercase letter, the shift key is required as part of the key equivalent.

toggled

Boolean

Specifies whether a check item is selected. If not specified, the MenuBuilder framework treats the item as if the value was false and the item is not selected.

type

String

Specifies the type of menu item. Meaningful values are separator and check . The MenuBuilder framework treats all other values, or elements or objects with no type entry, as normal menu entries.

The MenuBuilder framework ignores all other object properties or XML attributes.

// Ethnio survey code removed