]> git.saurik.com Git - wxWidgets.git/blame - wxPython/demo/wxMessageDialog.py
A little tweak to the usage text
[wxWidgets.git] / wxPython / demo / wxMessageDialog.py
CommitLineData
8fa876ca
RD
1# 11/20/2003 - Jeff Grimmett (grimmtooth@softhome.net)
2#
3# o Updated for wx namespace
4#
cf694132 5
8fa876ca 6import wx
cf694132
RD
7
8#---------------------------------------------------------------------------
9
10def runTest(frame, nb, log):
8fa876ca
RD
11 dlg = wx.MessageDialog(frame, 'Hello from Python and wxPython!',
12 'A Message Box', wx.OK | wx.ICON_INFORMATION)
26197023 13 #wxYES_NO | wxNO_DEFAULT | wxCANCEL | wxICON_INFORMATION)
cf694132
RD
14 dlg.ShowModal()
15 dlg.Destroy()
16
17#---------------------------------------------------------------------------
18
19
20
cf694132 21overview = """\
8fa876ca
RD
22This class represents a dialog that shows a single or multi-line message, with a
23choice of OK, Yes, No and Cancel buttons.
cf694132 24
8fa876ca
RD
25Additionally, various style flags can determine whether an icon is displayed,
26and, if so, what kind.
cf694132 27
8fa876ca
RD
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.
cf694132 32
8fa876ca 33"""
cf694132 34
cf694132 35
1fded56b
RD
36if __name__ == '__main__':
37 import sys,os
38 import run
39 run.main(['', os.path.basename(sys.argv[0])])