IupMessageDlg
13
IupMessageDlg
@serial = 852
dialog
Description
[distinct from IupMessage] Creates the Message Dialog element. It is a predefined dialog for displaying a message. The dialog can be shown with the IupPopup function only.
Include
iup.e
Namespace
iup
Signature
public function IupMessageDlg()
Creation
title: dialog title
message: text message contents
Attribute
BUTTONDEFAULT: Number of the default button. Can be "1", "2" or "3". "2" is valid only for "RETRYCANCEL", "OKCANCEL" and "YESNO" button configurations. "3" is valid only for "YESNOCANCEL". Default: "1".
BUTTONRESPONSE: Number of the pressed button. Can be "1", "2" or "3". Default: "1".
BUTTONS: Buttons configuration. Can have values: "OK", "OKCANCEL", "RETRYCANCEL", "YESNO", or "YESNOCANCEL". Default: "OK". Additionally the "Help" button is displayed if the HELP_CB callback is defined. (RETRYCANCEL and YESNOCANCEL since 3.16)
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.
Callback
HELP_CB: Action generated when the Help button is pressed.
Notes
The IupMessageDlg is a native pre-defined dialog not altered by IupSetLanguage.
To show the dialog, use function IupPopup. In Lua, use the popup function.
The dialog is mapped only inside IupPopup, IupMap does nothing.
In Windows the position (x,y) used in IupPopup is ignored and the dialog is always centered on screen.
The IupMessage function simply creates and popup a IupMessageDlg.
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.
Example
include iup/iup.e IupOpen(NULL) atom dlg = IupMessageDlg() IupSetAttribute(dlg, "DIALOGTYPE", "WARNING") IupSetAttribute(dlg, "TITLE", "IupMessageDlg Test") IupSetAttribute(dlg, "BUTTONS", "OKCANCEL") IupSetAttribute(dlg, "VALUE", "Message Text\nSecond Line") --IupSetCallback(dlg, "HELP_CB", Icallback("help_cb")) IupPopup(dlg, IUP_CURRENT, IUP_CURRENT) printf("BUTTONRESPONSE(%s)\n", IupGetAttribute(dlg, "BUTTONRESPONSE")) IupDestroy(dlg) IupMainLoop() IupClose()
See Also
IupFileDlg | IupMessageDlg | IupFontDlg | IupProgressDlg | IupAlarm | IupGetFile | IupGetColor | IupGetParam | IupGetText | IupListDialog | IupMessage | IupScanf | IupLayoutDialog | IupElementPropertiesDialog |
Not Categorized, Please Help
|