1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148
|
.. wxPython Phoenix documentation
This file was generated by Phoenix's sphinx generator and associated
tools, do not edit by hand.
Copyright: (c) 2011-2018 by Total Control Software
License: wxWindows License
.. include:: headings.inc
.. module:: wx.lib.agw.genericmessagedialog
.. currentmodule:: wx.lib.agw.genericmessagedialog
.. highlight:: python
.. _wx.lib.agw.genericmessagedialog:
==========================================================================================================================================
|phoenix_title| **wx.lib.agw.genericmessagedialog**
==========================================================================================================================================
This class is a possible, fancy replacement for :class:`MessageDialog`.
Description
===========
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 :class:`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 :class:`~wx.lib.agw.aquabutton.AquaButton`
and :class:`~wx.lib.agw.gradientbutton.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
=====
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()
Supported Platforms
===================
:class:`GenericMessageDialog` has been tested on the following platforms:
* Windows (Windows XP).
Window Styles
=============
This class supports the following window styles:
=========================== =========== ==================================================
Window Styles Hex Value Description
=========================== =========== ==================================================
``GMD_DEFAULT`` 0x0 Uses generic buttons.
``GMD_USE_AQUABUTTONS`` 0x20 Uses :mod:`lib.agw.aquabutton` buttons instead of generic buttons.
``GMD_USE_GRADIENTBUTTONS`` 0x40 Uses :mod:`lib.agw.gradientbutton` buttons instead of generic buttons.
=========================== =========== ==================================================
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
=========================== =========== ==================================================
``wx.OK`` 0x4 Shows an ``OK`` button.
``wx.CANCEL`` 0x10 Shows a ``Cancel`` button.
``wx.YES_NO`` 0xA Show ``Yes`` and ``No`` buttons.
``wx.YES_DEFAULT`` 0x0 Used with ``wx.YES_NO``, makes ``Yes`` button the default - which is the default behaviour.
``wx.NO_DEFAULT`` 0x80 Used with ``wx.YES_NO``, makes ``No`` button the default.
``wx.ICON_EXCLAMATION`` 0x100 Shows an exclamation mark icon.
``wx.ICON_HAND`` 0x200 Shows an error icon.
``wx.ICON_ERROR`` 0x200 Shows an error icon - the same as ``wx.ICON_HAND``.
``wx.ICON_QUESTION`` 0x400 Shows a question mark icon.
``wx.ICON_INFORMATION`` 0x800 Shows an information icon.
=========================== =========== ==================================================
Events Processing
=================
`No custom events are available for this class.`
License And Version
===================
:class:`GenericMessageDialog` is distributed under the wxPython license.
Latest Revision: Andrea Gavana @ 19 Dec 2012, 21.00 GMT
Version 0.8
|class_summary| Classes Summary
===============================
================================================================================ ================================================================================
:ref:`~wx.lib.agw.genericmessagedialog.GenericMessageDialog` Main class implementation, :class:`GenericMessageDialog` is a possible replacement
:ref:`~wx.lib.agw.genericmessagedialog.StdDialogButtonSizer` wxWidgets standard dialog button sizer.
================================================================================ ================================================================================
|
.. toctree::
:maxdepth: 1
:hidden:
wx.lib.agw.genericmessagedialog.GenericMessageDialog
wx.lib.agw.genericmessagedialog.StdDialogButtonSizer
|