2.27 .button[integer]

A messagebox can display a maximum of three buttons. The function allocation of each of these buttons can be made with .button[integer].

Definition

  • Data type

    enum

  • Access

    get, set

  • changed event

    yes

Value range

button_abort

Displays the Abort button.

button_cancel

Displays the Cancel button.

button_ignore

Displays the Ignore button.

button_no

Displays the No button.

button_ok

Displays the OK button.

button_retry

Displays the Retry button.

button_yes

Displays the Yes button.

nobutton

For the index value no button is displayed.

The following combinations are allowed for .button[1-3]:

.button[1]

.button[2]

.button[3]

button_ok

nobutton

nobutton

button_ok

button_cancel

nobutton

button_cancel

nobutton

nobutton

button_retry

button_abort

nobutton

button_retry

button_abort

button_ignore

button_yes

button_no

nobutton

button_yes

button_no

button_cancel

A button is not displayed if it is defined as nobutton.

If an ineligible button combination is set, the combination will be treated as an error by the window system, i.e. the messagebox does not appear and the return value is nobutton.

Remark on the IDM for Windows

The combinations button_cancelnobuttonnobutton and button_retrybutton_abortnobutton are not supported.

Attention

Combinations differing from the table above and valid for Motif are not possible for Microsoft Windows.

Remark on the IDM for Motif

The Escape key usually activates a Cancel button.

Example

messagebox Messagebox1
{
  .text      "This text notifies you of an error.";
  .title     "Error Message";
  .icon      icon_exclamation;
  .button[1] button_ok;
  .button[2] button_cancel;
}