Argument |
Data type/notes |
self |
the window (background) that is the parent
for the dialog |
message |
quoted string displayed as the message in the dialog |
title |
quoted string displayed in title bar of
dialog |
OPTIONAL icon |
You may optionally include one of the defined
wxPython constants defining an icon to be displayed in the message dialog.
By default, PythonCard displays the "info" icon shown in the figure above.
See below for details. |
OPTIONAL buttons |
You may optionally include one of the defined exPython
constants defining one or more button names to be displayed in the Message
dialog. By default, PythonCard displays the "OK" and "Cancel" buttons shown
in the figure above. See below for details. Note that as of PythonCard 0.8 the fourth and fifth args have been combined, so you should use | (binary or) to join them (e.g. wx.ICON_EXCLAMATION | wx.OK). |
result = dialog.messageDialog(self, 'a message', 'a title')
Constant |
Description of Icon |
wx.ICON_EXCLAMATION |
Exclamation point |
wx.ICON_HAND |
Hand, or error, icon |
wx.ICON_ERROR |
Same as ICON_HAND |
wx.ICON_QUESTION |
Question mark |
wx.ICON_INFORMATION |
Small "i" icon, the default icon |
Constant |
Button Labels |
wx.OK |
OK Button |
wx.CANCEL |
Cancel Button |
wx.YES_NO |
Two buttons, one labeled "Yes" and the other labeled
"No" |
wx.YES_DEFAULT |
If you supply BUTTON_YES_NO as the button constant,
you can optionally include this constant to cause the "Yes" button to be the
default button. Since "Yes" is always the default button unless you change
it, this constant is probably not of much use. |
wx.NO_DEFAULT |
If you supply wx.YES_NO as the button constant,
you can optionally include this constant to cause the "No" button to be the
default button. |
Name of value |
Description |
accepted |
True = user clicked OK False = user clicked Cancel |
returnedString |
string containing 'Ok' or 'Cancel' reflecting
which button the user clicked to dismiss the Message dialog |