Please enable JavaScript to view this site.

ESL Documentation

Definition

Define a push button.

[enabled|disabled] [visible|invisible]

[help] [cancel] [verify] [default]

push button PB_NAME

size WIDTH HEIGHT at [position] X Y in DB_NAME

[parameter is PAR_STRING]

[helpid is HELP_ID]

[group is GROUP_NAME]

[text TEXT_STRING]

[font FONT_NAME]

enabled | disabled

Define the push button 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.

help

Make this button the Help push button. This means pressing this button will have the same effect as pressing the F1 function key. The application will not receive a response event.

cancel

Make this button the Cancel push button. This means that the response for this button will be taken if the user: presses the Escape key; double-clicks on the system menu; or selects the Close choice from the parent's system menu.

verify

This push button should trigger checking for data in required entry fields in the dialog box or dialog region parent object.

default

Make this button the default push button. This means that the response for this button will be taken if the user presses the Return or Enter key. This is the initial condition in the dialog box, although the user may change the default push button by actions such as tabbing. The border for this button is thicker than the usual border.

PB_NAME

The identifier for a push button.

size WIDTH HEIGHT

Integer values representing the dimensions of the push button in dialog units.

at X Y

Integer values representing the position of the push button 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 push button; the default is "".

helpid is HELP_ID

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

group is GROUP_NAME

An identifier for the group to which the push button belongs.

text TEXT_STRING

A string value representing the text of the push button. This text will be displayed in the center of the push button. To indicate a mnemonic character, precede one character in the string with a tilde (~). The mnemonic character will be underlined in the text of the pulldown. If the user presses this letter, when not in an entry field, this object will be selected. The default TEXT_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.

Description

A push button is a dialog control and must have a dialog box or dialog region as its parent.

Only the push button keywords, the identifier, at [position], the size specification, and in DB_NAME are required in the definition.

When specifying attributes, parameter and text can be specified in any order; all other attributes must be specified in the order shown in the model.Next Remark added due to Forms Entry enhancements. 8-15-90 SAT

Required data checking occurs for entry fields that have the required keyword specified. To specify checking for required data when the user tries to save the contents of the dialog box or dialog region, specify the verify keyword for the OK push button.

A Help push button does not get the focus when the user clicks on it, and does not invoke a response in ESL. Instead, ESL responds as though the user pressed the F1 key.

We recommend that you put all related push buttons in a group. If you do not, then users can tab between push buttons, which temporarily changes the default push button as they move. When you place related push buttons in a group, then users can tab to the group and the focus will be on the default push button. They can then use the arrow keys to move to the other push buttons in the group.

Example

invisible dialog box SaveFile

size 160 100 at position 200 200

dialog border

title bar "Save Output File"

system menu

default push button Save

size 38 12 at position 6 4 in SaveFile

text "Save"

cancel push button Cancel

size 38 12 at position 56 4 in SaveFile

text "Cancel"