Please enable JavaScript to view this site.

ESL Documentation

Definition

Define a pulldown choice item.

[enabled|disabled] [checked] [static]

choice CHOICE_NAME text CHOICE_TEXT

[accelerator is

[control|alt|shift [control|alt|shift] ...] ACCEL_KEY]

[parameter is PAR_STRING]

[helpid is HELP_ID]

enabled | disabled

A disabled choice is displayed grayed and cannot be selected. enabled is the default.

checked

Display the choice with a checkmark to its left.

static

The choice is for informational purposes only and cannot be selected.

CHOICE_NAME

The identifier for the choice.

text CHOICE_TEXT

A string value representing the text that should appear in the choice. This text can be any string. The text can contain the tilde (~) character to indicate the mnemonic character. The text can also include \t escape sequence. The \t escape sequence left-aligns a second column of text following the escape sequence. You cannot use the tilde (~) after \t. Note that you cannot use \t with a static choice.

accelerator is ACCEL_KEY

A single-character string, or an integer constant selected from a pre-defined list found in an include file (ACCEL.INC), representing the associated accelerator key that the user can press to select the choice. The ACCEL.INC file assigns integer constant names to each of the integer values, and these constant names can be used if this file is included. You can combine the accelerator key with one or two of the keywords control, alt, or shift. The ACCEL_KEY character string is case-independent. The shift keyword determines that the accelerator key will be uppercase. You cannot combine the Alt key with the Shift and Ctrl keys.

control

The user must hold down the Ctrl key when pressing the key defined in ACCEL_KEY.

alt

The user must hold down the Alt key when pressing the key defined in ACCEL_KEY.

shift

The user must hold down the Shift key when pressing the key defined in ACCEL_KEY.

parameter is PAR_STRING

A string value representing the parameter of the choice.

helpid is HELP_ID

A string or integer value representing the identifier of the help panel you want displayed when the user requests help for this item. This should match a help panel defined in the help library specified by the help library declaration.

Description

A choice is one of the units in a pulldown. It is selectable if the choice is enabled and not static.

Be sure to identify the accelerator keys in the text of the pulldown choice, so that the user knows which keys to press.

To use the constants in the ACCEL.INC file, be sure to include the file before defining any action bar templates.

Choice items can be defined within a pulldown or as standalone templates. As a standalone template, a choice can be referenced (and therefore included) in any pulldown definition.

The parameter of an item is attached to, and is an attribute of, the item defined in the action bar template or the standalone item template. If the parameter is changed in an action statement, it is changed in the template definition and everywhere it is referenced.

Example

include accel.inc

action bar Edit_Mail_AB is

pulldown Edit text "~Edit"

choice Undo_MC text "~Undo\tAlt+Backspace"

accelerator is alt KEY_BACKSPACE

separator

choice Cut_MC text "Cu~t\tShift+Del"

accelerator is shift KEY_DELETE

choice Copy_MC text "~Copy\tCtrl+Ins"

accelerator is control KEY_INSERT

choice Paste_MC text "~Paste\tShift+Ins"

accelerator is shift KEY_INSERT

separator

choice Clear_MC text "Cl~ear\tDel"

accelerator is KEY_DELETE

end pulldown

end action bar

See Also

action bar is Template Definition

item Reference

pulldown Definition