NAME

IUP::MessageDlg - [pre-defined dialog] displaying a message

DESCRIPTION

Creates the Message Dialog element. It is a predefined dialog for displaying a message. The dialog can be shown with the IUP::Popup function only.

GTK Motif Windows

USAGE

CREATION - new() method

$messagedlg = IUP::MessageDlg->new( BUTTONS=>"OKCANCEL" );

Returns: the identifier of the created element, or undef if an error occurs.

NOTE: You can pass to new() other ATTRIBUTE=>'value' or CALLBACKNAME=>\&func pairs relevant to this element - see IUP::Manual::02_Elements.

ATTRIBUTES

For more info about concept of attributes (setting/getting values etc.) see IUP::Manual::03_Attributes. Attributes specific to this element:

BUTTONDEFAULT

Number of the default button. Can be "1" or "2". "2" is valid only for "OKCANCEL" and "YESNO" button configurations. Default: "1".

BUTTONRESPONSE

Number of the pressed button. Can be "1" or "2". Default: "1".

BUTTONS

Buttons configuration. Can have values: "OK", "OKCANCEL" or "YESNO". Default: "OK". Additionally the "Help" button is displayed if the HELP_CB callback is defined.

DIALOGTYPE

Type of dialog defines which icon will be displayed besides the message text. Can have values: "MESSAGE" (No Icon), "ERROR" (Stop-sign), "WARNING" (Exclamation-point), "QUESTION" (Question-mark) or "INFORMATION" (Letter "i"). Default: "MESSAGE".

PARENTDIALOG

(creation only) Name of a dialog to be used as parent. This dialog will be always in front of the parent dialog. If not defined in Motif the dialog could not be modal.

TITLE

Dialog title.

VALUE

Message text.

CALLBACKS

For more info about concept of callbacks (setting callback handlers etc.) see IUP::Manual::04_Callbacks. Callbacks specific to this element:

HELP_CB

Action generated when the Help button is pressed.

NOTES

The IUP::MessageDlg is a native pre-defined dialog not altered by SetLanguage.

To show the dialog, use function Popup. function.

The dialog is mapped only inside Popup, Map does nothing.

In Windows the position (x,y) used in Popup is ignored and the dialog is always centered on screen.

The Message function simply creates and popup a IUP::MessageDlg.

In Windows each different dialog type is always associated with a different beep sound.

In Windows, if PARENTDIALOG is specified then it will be modal relative only to its parent.

EXAMPLES

The element IUP::MessageDlg is used in the following sample scripts:

SEE ALSO

Message, GetParam, ListDialog()">, Alarm, GetFile, Popup

The original doc: iupmessagedlg.html