Please enable JavaScript to view this site.

ESL Documentation

Definition

Define an action bar button item.

[enabled|disabled]

button BUTTON_NAME text BUTTON_TEXT

[accelerator is [[control|alt|shift]

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

[parameter is PAR_STRING]

[helpid is HELP_ID]

enabled | disabled

Define the button as selectable or not. If you define the button as disabled, it is displayed, it is displayed greyed and cannot be selected. The default is enabled.

BUTTON_NAME

The identifier for the button.

text BUTTON_TEXT

A string value representing the text associated with the button. This text will be displayed in the action bar. If a character in the string is preceded by the tilde (~) character, that character is used as the mnemonic for the button and will be under lined in the text of the button. If the user presses this character (or the accelerator, if specified) when not in an entry field, this object will be selected.

control

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

alt

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

shift

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

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. The ACCEL.INC file assigns string 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 any number of the status flags control, alt, or shift. Note that the ACCEL_KEY character string is case-independent. It is the shift keyword that determines whether the accelerator key will be uppercase.

PAR_STRING

A string value representing the parameter of the button.

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

Use this statement to define an action bar button item.

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

To use the constants in the ACCEL.INC file, be sure to include the file prior to the definition of any action bar templates.

Typically, a button is used to display the "F1 = Help" message in the action bar of the primary window.

Buttons may be interspersed with pulldowns and therefore will appear in the action bar in the order in which they are defined. Conventionally, buttons should appear after pulldowns in the action bar.

ESL does not take responses defined for help buttons; their behavior is controlled by Windows.

Buttons do not conform to CUA (Common User Access) guide lines.

You can define button items within an action bar or as a standalone templates. Standalone templates can be referenced, and therefore included, in any action bar template.

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 View_Mail_AB is

pulldown Exit text "~Exit"

choice Exit_Choice text "E~xit"

choice Resume_Choice text "~Resume"

end pulldown

enabled help button Help

text "F1 = Help"

end action bar

See Also

action bar is Template Definition

item Reference