]> git.saurik.com Git - wxWidgets.git/blob - wxPython/demo/wxMessageDialog.py
Applied patch [ 827011 ] Event-based processing of item tooltips in wxTreeCtrl
[wxWidgets.git] / wxPython / demo / wxMessageDialog.py
1 # 11/20/2003 - Jeff Grimmett (grimmtooth@softhome.net)
2 #
3 # o Updated for wx namespace
4 #
5
6 import wx
7
8 #---------------------------------------------------------------------------
9
10 def 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
21 overview = """\
22 This class represents a dialog that shows a single or multi-line message, with a
23 choice of OK, Yes, No and Cancel buttons.
24
25 Additionally, various style flags can determine whether an icon is displayed,
26 and, if so, what kind.
27
28 The dialog can be modal or not; of modal, the user's response is in the return
29 code of ShowModal(). If not, the response can be taken from GetReturnCode() (inherited
30 from the wxDialog super class). If not modal and the return code is required, it
31 must be retrieved before the dialog is destroyed.
32
33 """
34
35
36 if __name__ == '__main__':
37 import sys,os
38 import run
39 run.main(['', os.path.basename(sys.argv[0])])