Please enable JavaScript to view this site.

ESL Documentation

Definition

Define a drop-down list.

[enabled|disabled] [visible|invisible]

[[color] COLOR] dropdown list DL_NAME

size WIDTH HEIGHT at [position] X Y in DB_NAME

[parameter is PAR_STRING]

[helpid is HELP_ID]

[group is GROUP_NAME]

[text size TEXT_LIMIT columns]

[text FIELD_STRING]

[font FONT_NAME]

[sort {ascending|descending}]

[[insert{LB_STRING|file ASCII_FILE_NAME}] ...]

enabled | disabled

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

visible | invisible

A visible object is displayed when it is defined. An invisible object is not displayed until you specifically make it visible. The default is visible.

color COLOR

A color keyword, a string value representing a color keyword, or an integer value representing a color number corresponding to a color available on your system.

DL_NAME

The identifier for the drop-down list you are defining.

size WIDTH HEIGHT

Integer values representing the dimensions of the drop-down list in dialog units.

at X Y

Integer values representing the position of the drop-down list in dialog units.

in DB_NAME

The identifier for the dialog box or dialog region parent object.

parameter is PAR_STRING

A string value representing the parameter of the drop-down list. The default PAR_STRING is "".

helpid is HELP_ID

A string or integer value representing the identifier for the help panel you want displayed when the user requests help for this control. This should match the help panel defined in the library specified by the help library declaration. The default HELP_ID is "".

group is GROUP_NAME

A string value identifying the group of other dialog control objects to which this drop-down list belongs.

text size TEXT_LIMIT columns

An integer value representing the maximum number of characters that the selection field portion of the drop-down list can contain. The default TEXT_LIMIT value is 32.

text FIELD_STRING

A string value representing the initial text that the selection field portion of the drop-down list will contain. The default FIELD_STRING is "".

font FONT_NAME

The name of the font in which you want the TEXT_STRING to appear. You may use either system or ESL fonts. (See the description of the font is Font Reference Definition.)

You cannot change the font of a control at runtime.

sort ascending | descending

Sort entries in the list box portion of the drop-down list in ascending or descending order. If you omit this specification, ESL adds entries inserted into the list box at the end.

insert LB_STRING

Insert the specified string value into the list box portion of the drop-down list.

insert file ASCII_FILE_NAME

Insert the text from the specified ASCII file (include the filename extension) into the list box portion of the drop-down list.

Description

A drop-down list is a dialog control and must have a dialog box or dialog region as its parent.

In ESL for Windows, the initial value of the selection must exactly match one of the entries in the list box, or else the selection field is empty.

Example

dropdown list ColorChoice_DL

size 80 50 at 50 40 in Choices_DB

insert "Blue\nGreen\nRed"

See Also

combination box Definition

list box Definition