]> git.saurik.com Git - wxWidgets.git/blob - wxPython/demo/TextEntryDialog.py
Use wxAutoNSAutoreleasePool when destroying wxIconRefData
[wxWidgets.git] / wxPython / demo / TextEntryDialog.py
1
2 import wx
3
4 #---------------------------------------------------------------------------
5
6 def runTest(frame, nb, log):
7 dlg = wx.TextEntryDialog(
8 frame, 'What is your favorite programming language?',
9 'Eh??', 'Python')
10
11 dlg.SetValue("Python is the best!")
12
13 if dlg.ShowModal() == wx.ID_OK:
14 log.WriteText('You entered: %s\n' % dlg.GetValue())
15
16 dlg.Destroy()
17
18
19 #---------------------------------------------------------------------------
20
21
22
23 overview = """\
24 This class represents a dialog that requests a one-line text string from the user.
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,
27 wx.TE_PASSWORD could be used to create a password dialog.
28
29 As with other dialogs of this type, the user input must be retrieved prior to
30 destroying the dialog.
31
32 """
33
34
35 if __name__ == '__main__':
36 import sys,os
37 import run
38 run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:])