]> git.saurik.com Git - wxWidgets.git/blame_incremental - wxPython/demo/wxMessageDialog.py
reSWIGged
[wxWidgets.git] / wxPython / demo / wxMessageDialog.py
... / ...
CommitLineData
1# 11/20/2003 - Jeff Grimmett (grimmtooth@softhome.net)
2#
3# o Updated for wx namespace
4#
5
6import wx
7
8#---------------------------------------------------------------------------
9
10def runTest(frame, nb, log):
11 dlg = wx.MessageDialog(frame, 'Hello from Python and wxPython!',
12 'A Message Box', wx.OK | wx.ICON_INFORMATION)
13 #wxYES_NO | wxNO_DEFAULT | wxCANCEL | wxICON_INFORMATION)
14 dlg.ShowModal()
15 dlg.Destroy()
16
17#---------------------------------------------------------------------------
18
19
20
21overview = """\
22This class represents a dialog that shows a single or multi-line message, with a
23choice of OK, Yes, No and Cancel buttons.
24
25Additionally, various style flags can determine whether an icon is displayed,
26and, if so, what kind.
27
28The dialog can be modal or not; of modal, the user's response is in the return
29code of ShowModal(). If not, the response can be taken from GetReturnCode() (inherited
30from the wxDialog super class). If not modal and the return code is required, it
31must be retrieved before the dialog is destroyed.
32
33"""
34
35
36if __name__ == '__main__':
37 import sys,os
38 import run
39 run.main(['', os.path.basename(sys.argv[0])])