]>
Commit | Line | Data |
---|---|---|
8fa876ca RD |
1 | # 11/21/2003 - Jeff Grimmett (grimmtooth@softhome.net) |
2 | # | |
3 | # o Updated for wx namespace | |
4 | # | |
cf694132 | 5 | |
8fa876ca | 6 | import wx |
cf694132 RD |
7 | |
8 | #--------------------------------------------------------------------------- | |
9 | ||
10 | def runTest(frame, nb, log): | |
8fa876ca RD |
11 | dlg = wx.TextEntryDialog( |
12 | frame, 'What is your favorite programming language?', | |
13 | 'Duh??', 'Python') | |
14 | ||
a1bfae9d | 15 | dlg.SetValue("Python is the best!") |
8fa876ca RD |
16 | |
17 | if dlg.ShowModal() == wx.ID_OK: | |
cf694132 | 18 | log.WriteText('You entered: %s\n' % dlg.GetValue()) |
8fa876ca | 19 | |
cf694132 RD |
20 | dlg.Destroy() |
21 | ||
22 | ||
23 | #--------------------------------------------------------------------------- | |
24 | ||
25 | ||
26 | ||
1fded56b | 27 | overview = """\ |
8fa876ca RD |
28 | This class represents a dialog that requests a one-line text string from the user. |
29 | It is implemented as a generic wxWindows dialog. Along with the usual wxDialog | |
30 | style flags, all of the wxTextCtrl TE_* style flags are accepted, so, for example, | |
31 | wx.TE_PASSWORD could be used to create a password dialog. | |
cf694132 | 32 | |
8fa876ca RD |
33 | As with other dialogs of this type, the user input must be retrieved prior to |
34 | destroying the dialog. | |
cf694132 | 35 | |
8fa876ca | 36 | """ |
cf694132 RD |
37 | |
38 | ||
1fded56b RD |
39 | if __name__ == '__main__': |
40 | import sys,os | |
41 | import run | |
42 | run.main(['', os.path.basename(sys.argv[0])]) |