Please enable JavaScript to view this site.

ESL Documentation

Definition

Define a pulldown item.

[enabled|disabled]

pulldown PD_NAME text PD_TEXT

 [parameter is PAR_STRING]

 [helpid is HELP_ID]

 [ITEM_DEF_OR_REF] ...

end pulldown

enabled | disabled

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

PD_NAME

An identifier for a pulldown.

text PD_TEXT

A string containing the text you want to appear in the action bar or pulldown item that displays this pulldown. To indicate the mnemonic character, precede one character in the string with a tilde (~). The mnemonic character will be underlined in the text of the pulldown.

parameter is PAR_STRING

A string value representing the parameter of the pulldown. The default value is "".

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. If your application will run under Windows version 3.0, HELP_ID must be an integer.

ITEM_DEF_OR_REF

The definition for, or reference to, one or more menu choice(s), separator(s), or pulldown(s).

Description

A pulldown is a list of choices displayed vertically, with optional separators (lines separating the choices).

Pulldown items can be defined within an action bar or as standalone templates. As standalone templates, they can be referenced (and therefore included) in any action bar template, or used as a pop-up menu template.

The parameter of an item is attached to, and is an attribute of, 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.

You can create cascading menus by nesting pulldowns. In ESL for Windows, the system resources determine the number of levels to which you can nest the pulldown. In ESL for OS/2, you can nest a maximum of 24 levels. A pulldown definition may not reference itself, directly or indirectly.

Example

 

action bar Master_ActionBar is

 pulldown File text "~File"

         choice File_Open text "~Open..."

         disabled choice File_New text "~New"

         separator

         disabled choice File_Save text "~Save"

         disabled choice File_SaveAs text "Save ~As..."

         separator

         choice File_Exit text "E~xit\tF3"

                 accelerator is KEY_F3

 end pulldown

 ...

 

# Cascading menus

pulldown Graph text "~Graph"

 pulldown GraphType text "~Type"

         checked choice BarGraph text "~Bar Graph"

         choice PieGraph text "~Pie Graph"

         choice LineGraph text "~Line Graph"

 end pulldown

 choice GraphCreate text "~Create"

 pulldown GraphErase text "~Erase"

         choice EraseAll text "~All"

         choice EraseCurrent text "Cu~rrent"

 end pulldown

end pulldown

 ...

See Also

action bar is Template Definition

item Reference