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