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
Children
Parent
Menu
none
23.1 Attributes
Attribute |
RLD |
PID |
Properties |
Short Description |
---|---|---|---|---|
identifier |
color |
S,G/D/C |
background color |
|
enum |
enum |
S,G/D/C |
display of buttons for messagebox
|
|
class |
class |
-,G/-/- |
class/id of object |
|
identifier |
cursor |
S,G/D/C |
cursor belonging to object |
|
integer |
integer |
S,G/D/C |
default pushbutton in a dialogbox |
|
identifier |
instance |
-,G/-/- |
dialog to which the object belongs |
|
object |
document |
S,G/-/- |
accesses the I-th XML Document |
|
boolean |
boolean |
-,G/-/- |
returns if the object class is an USW class |
|
class |
class |
-,G/-/- |
returns the I-th registered USW class |
|
identifier |
color |
S,G/D/C |
foreground color |
|
object |
record |
S,G/-/C |
accesses the first record of an object |
|
identifier |
font |
S,G/D/C |
object font |
|
object |
tile |
S,G/D/C |
assigns object to icon: |
|
integer index |
integer index |
-,G/-/- |
current index of object in the child list of its parent |
|
string |
string |
S,G/D/C |
name/identifier of object |
|
object |
record |
S,G/-/C |
accesses the last record of an object |
|
attribute |
attribute |
-,G/-,- |
user-defined attribute [I] of object |
|
integer |
integer |
-,G/-,- |
number of user-defined attributes |
|
identifier |
instance |
S,G/D/C |
model belonging to object |
|
object |
record |
S,G/-/C |
accesses the I-th record of an object |
|
integer |
integer |
-,G/-/- |
queries the number of child records |
|
integer |
scope |
-,G/-/- |
queries the object type (Default, Model or instance) |
|
boolean |
boolean |
S,G/D/C |
specifies whether the messagebox is displayed in front of all other windows on the desktop |
|
string |
string |
S,G/D/C |
static text of object |
|
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.
- button_abort
- button_cancel
- button_ignore
- button_no
- button_ok
- button_retry
- button_yes
- nobutton
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.
- icon_asterisk
- icon_error
- icon_exclamation
- icon_hand
- icon_information
- icon_query
- icon_question
- icon_warning
- noicon
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; }