]>
Commit | Line | Data |
---|---|---|
cf694132 | 1 | |
8fa876ca | 2 | import wx |
cf694132 RD |
3 | |
4 | #--------------------------------------------------------------------------- | |
5 | ||
6 | def 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 | 17 | overview = """\ |
8fa876ca RD |
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. | |
cf694132 | 20 | |
8fa876ca RD |
21 | Additionally, various style flags can determine whether an icon is displayed, |
22 | and, if so, what kind. | |
cf694132 | 23 | |
8fa876ca RD |
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 | |
95bfd958 | 26 | from the wx.Dialog). If not modal and the return code is required, it |
8fa876ca | 27 | must be retrieved before the dialog is destroyed. |
cf694132 | 28 | |
8fa876ca | 29 | """ |
cf694132 | 30 | |
cf694132 | 31 | |
1fded56b RD |
32 | if __name__ == '__main__': |
33 | import sys,os | |
34 | import run | |
35 | run.main(['', os.path.basename(sys.argv[0])]) |