Please enable JavaScript to view this site.

ESL Documentation

Definition

Define a static text object.

[enabled|disabled] [visible|invisible] [[color] COLOR ]

static text ST_NAME

size WIDTH HEIGHT at [position] X Y in DB_NAME

[parameter is PAR_STRING]

[helpid is HELP_ID]

[ {left|right|[horizontal] center}

[align]

{top|bottom|vertical center} align ]

[word wrap]

[text TEXT_STRING]

[font FONT_NAME]

enabled | disabled

Define the static text as selectable or not. If you define the static text 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.

ST_NAME

The identifier for a static text object.

size WIDTH HEIGHT

Integer values representing the dimensions of the object in dialog units.

at X Y

Integer values representing the position of the object in dialog units.

in DB_NAME

Identifier for the dialog box or dialog region parent object.

parameter is PAR_STRING

A string value representing the parameter of the radio button. The default value 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 " ".

align

The alignment of the text within the object. The default alignment is top left.

word wrap

Wrap the text in the object to the next line instead of clipping it to the edges of the window. The default is word wrap on.

text TEXT_STRING

A string value representing the text of the object. The default TEXT_STRING is "".

font FONT_NAME

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

Description

A static text object is a dialog control and must have a dialog box or dialog region as its parent.

Because static text cannot be selected, the selectability of the object actually refers to the color of the text. Enabled static text is drawn in normal color. Disabled static text is drawn in gray.

Only the static text keywords, the identifier, the size specification, the at specification, and in DB_NAME are required in the definition.

When specifying attributes, parameter, align, word wrap, and text can be specified in any order; all other attributes must be specified in the order shown in the model.

Note that, because static text cannot have the focus, you cannot use the helpid for static text. However, the helpid option can be used as a second parameter.

Static text wraps to the next line, even if word wrap is not defined in the syntax. Also, if you want an ampersand (&) to appear in static text, use two ampersands (&&) in the static text definition.

Example

# In ESL for Windows:

invisible dialog box SaveFile

size 160 100 at position 200 200

dialog border

title bar "Save Output File"

system menu

static text Instructions

size 100 8 at position 0 80 in SaveFile

horizontal center

text "Enter filename and press Save"