]>
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.TextEntryDialog( |
8 | frame, 'What is your favorite programming language?', | |
95bfd958 | 9 | 'Eh??', 'Python') |
8fa876ca | 10 | |
a1bfae9d | 11 | dlg.SetValue("Python is the best!") |
8fa876ca RD |
12 | |
13 | if dlg.ShowModal() == wx.ID_OK: | |
cf694132 | 14 | log.WriteText('You entered: %s\n' % dlg.GetValue()) |
8fa876ca | 15 | |
cf694132 RD |
16 | dlg.Destroy() |
17 | ||
18 | ||
19 | #--------------------------------------------------------------------------- | |
20 | ||
21 | ||
22 | ||
1fded56b | 23 | overview = """\ |
8fa876ca | 24 | This class represents a dialog that requests a one-line text string from the user. |
95bfd958 RD |
25 | It is implemented as a generic wxWindows dialog. Along with the usual wx.Dialog |
26 | style flags, all of the wx.TextCtrl TE_* style flags are accepted, so, for example, | |
8fa876ca | 27 | wx.TE_PASSWORD could be used to create a password dialog. |
cf694132 | 28 | |
8fa876ca RD |
29 | As with other dialogs of this type, the user input must be retrieved prior to |
30 | destroying the dialog. | |
cf694132 | 31 | |
8fa876ca | 32 | """ |
cf694132 RD |
33 | |
34 | ||
1fded56b RD |
35 | if __name__ == '__main__': |
36 | import sys,os | |
37 | import run | |
38 | run.main(['', os.path.basename(sys.argv[0])]) |