This class is a possible, fancy replacement for MessageDialog
.
This class represents a dialog that shows a single or multi-line message,
with a choice of OK
, Yes
, No
, Cancel
and Help
buttons. It is a possible
replacement for the standard MessageDialog
, with these extra functionalities:
Possibility to modify the dialog position;
Custom themed generic bitmap & text buttons;
Support for normal and extended message (in different fonts);
Custom labels for the OK
, Yes
, No
, Cancel
and Help
buttons;
Custom icons for the OK
, Yes
, No
, Cancel
and Help
buttons;
Possibility to set an icon to the dialog;
More visibility to the button getting the focus;
Support for Aqua buttons or Gradient buttons instead of themed ones (see AquaButton
and GradientButton
);
Possibility to automatically wrap long lines of text;
Good old Python code :-D .
And a lot more. Check the demo for an almost complete review of the functionalities.
Usage example:
import wx
import wx.lib.agw.genericmessagedialog as GMD
# Our normal wxApp-derived class, as usual
app = wx.App(0)
main_message = "Hello world! I am the main message."
dlg = GMD.GenericMessageDialog(None, main_message, "A Nice Message Box",
agwStyle=wx.ICON_INFORMATION | wx.OK)
dlg.ShowModal()
dlg.Destroy()
app.MainLoop()
GenericMessageDialog
has been tested on the following platforms:Windows (Windows XP).
This class supports the following window styles:
Window Styles |
Hex Value |
Description |
---|---|---|
|
0x0 |
Uses generic buttons. |
|
0x20 |
Uses |
|
0x40 |
Uses |
The styles above are mutually exclusive. The style chosen above can be combined with a bitlist containing flags chosen from the following:
Window Styles |
Hex Value |
Description |
---|---|---|
|
0x4 |
Shows an |
|
0x10 |
Shows a |
|
0xA |
Show |
|
0x0 |
Used with |
|
0x80 |
Used with |
|
0x100 |
Shows an exclamation mark icon. |
|
0x200 |
Shows an error icon. |
|
0x200 |
Shows an error icon - the same as |
|
0x400 |
Shows a question mark icon. |
|
0x800 |
Shows an information icon. |
No custom events are available for this class.
GenericMessageDialog
is distributed under the wxPython license.
Latest Revision: Andrea Gavana @ 19 Dec 2012, 21.00 GMT
Version 0.8
Main class implementation, |
|
wxWidgets standard dialog button sizer. |