23 messagebox

This object uses the standard messageboxes of the used window system.

A messagebox is opened via the built-in function querybox() or the function DM_QueryBox(). Please note that the attribute .visible is not available for this object!

Definition

{ export | reexport } { model } messagebox { <Identifier> }
{
  <object-specific attributes>
}

See Also

Built-in function querybox() in manual “Rule Language”

C function DM_QueryBox in manual “C Interface - Functions”

Events

extevent

Children

document

record

transformer

Parent

dialog

module

Menu

none

23.1 Attributes

Attribute

RLD

PID

Properties

Short Description

.bgc

identifier

color

S,G/D/C

background color

.button[integer]

enum

enum

S,G/D/C

display of buttons for messagebox

  • button_abort
  • button_cancel
  • button_ignore
  • button_no
  • button_ok
  • button_retry
  • button_yes
  • nobutton

.class

class

class

-,G/-/-

class/id of object

.cursor

identifier

cursor

S,G/D/C

cursor belonging to object

.defbutton

integer

integer

S,G/D/C

default pushbutton in a dialogbox

.dialog

identifier

instance

-,G/-/-

dialog to which the object belongs

.document[integer]

object

document

S,G/-/-

accesses the I-th XML Document

.external

boolean

boolean

-,G/-/-

returns if the object class is an USW class

.external[integer]

class

class

-,G/-/-

returns the I-th registered USW class

.fgc

identifier

color

S,G/D/C

foreground color

.firstrecord

object

record

S,G/-/C

accesses the first record of an object

.font

identifier

font

S,G/D/C

object font

.icon

object

tile

S,G/D/C

assigns object to icon:

  • icon_asterisk
  • icon_error
  • icon_exclamation
  • icon_hand
  • icon_information
  • icon_query
  • icon_question
  • icon_warning
  • noicon

.index

integer

index

integer

index

-,G/-/-

current index of object in the child list of its parent

.label

string

string

S,G/D/C

name/identifier of object

.lastrecord

object

record

S,G/-/C

accesses the last record of an object

.member[integer]

attribute

attribute

-,G/-,-

user-defined attribute [I] of object

.membercount

integer

integer

-,G/-,-

number of user-defined attributes

.model

identifier

instance

S,G/D/C

model belonging to object

.record[integer]

object

record

S,G/-/C

accesses the I-th record of an object

.recordcount

integer

integer

-,G/-/-

queries the number of child records

.scope

integer
(1, 2, 3)

scope

-,G/-/-

queries the object type (Default, Model or instance)

.sysmodal

boolean

boolean

S,G/D/C

specifies whether the messagebox is displayed in front of all other windows on the desktop

.text

string

string

S,G/D/C

static text of object

.title

string

identifier

string

text

S,G/D/C

title of entry

23.2 Specific Attributes

The texts of messagebox buttons can be defined by the attribute .msgboxtext[I] for the object dialog.

23.2.1 button[1-3]

The following values are available for the attribute .button.

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

A messagebox can display a maximum of three buttons. The assignment of each of these buttons is regulated by the attribute .button[I].

The following button combinations are allowed for the attribute .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

If an non-existing button combination is used it might be treated as an error by the window system. The messagebox is then not displayed, and the return value is nobutton.

Note for DM on Microsoft Windows

The combination "button_cancel - nobutton - nobutton" is not supported by Microsoft Windows.

Warning

Combinations differing from the table above and valid for Motif are not allowed on Microsoft Windows!

Note for DM on Motif

The Escape key usually activates a "Cancel" button. However, with Motif 1.1, the second button is always activated. In order to get the regular button behavior it is recommended to define the second button as "Cancel" button.

23.2.2 defbutton

The attribute .defbutton sets the default button. If the value is not valid because the button is invisible the window system will set a default button.

The following values are available for the attribute .icon.

See Also

Attribute .icon

23.3 Example

dialog Mess

messagebox MsBox
{
  .text  "Wollen Sie wirklich schon die Anwendung beenden?";
  .title "Beispiel Messagebox";
  .icon  icon_warning;
}

Figure 13-30: Messagebox