]> git.saurik.com Git - wxWidgets.git/blame - wxPython/demo/MessageDialog.py
Send an extra size event after creation to work around an apparent bug
[wxWidgets.git] / wxPython / demo / MessageDialog.py
CommitLineData
cf694132 1
8fa876ca 2import wx
cf694132
RD
3
4#---------------------------------------------------------------------------
5
6def runTest(frame, nb, log):
8fa876ca
RD
7 dlg = wx.MessageDialog(frame, 'Hello from Python and wxPython!',
8 'A Message Box', wx.OK | wx.ICON_INFORMATION)
26197023 9 #wxYES_NO | wxNO_DEFAULT | wxCANCEL | wxICON_INFORMATION)
cf694132
RD
10 dlg.ShowModal()
11 dlg.Destroy()
12
13#---------------------------------------------------------------------------
14
15
16
cf694132 17overview = """\
8fa876ca
RD
18This class represents a dialog that shows a single or multi-line message, with a
19choice of OK, Yes, No and Cancel buttons.
cf694132 20
8fa876ca
RD
21Additionally, various style flags can determine whether an icon is displayed,
22and, if so, what kind.
cf694132 23
8fa876ca
RD
24The dialog can be modal or not; of modal, the user's response is in the return
25code of ShowModal(). If not, the response can be taken from GetReturnCode() (inherited
95bfd958 26from the wx.Dialog). If not modal and the return code is required, it
8fa876ca 27must be retrieved before the dialog is destroyed.
cf694132 28
8fa876ca 29"""
cf694132 30
cf694132 31
1fded56b
RD
32if __name__ == '__main__':
33 import sys,os
34 import run
35 run.main(['', os.path.basename(sys.argv[0])])