]> git.saurik.com Git - wxWidgets.git/blame - wxPython/demo/wxTextEntryDialog.py
Fixed a bunch of leaking references in how the callbacks deal with
[wxWidgets.git] / wxPython / demo / wxTextEntryDialog.py
CommitLineData
cf694132
RD
1
2from wxPython.wx import *
3
4#---------------------------------------------------------------------------
5
6def runTest(frame, nb, log):
7 dlg = wxTextEntryDialog(frame, 'What is your favorite programming language?',
8 'Duh??', 'Python')
9 dlg.SetValue("Python is the best!") #### this doesn't work?
10 if dlg.ShowModal() == wxID_OK:
11 log.WriteText('You entered: %s\n' % dlg.GetValue())
12 dlg.Destroy()
13
14
15#---------------------------------------------------------------------------
16
17
18
19
20
21
22
23
24
25
26
27
28overview = """\
29This class represents a dialog that requests a one-line text string from the user. It is implemented as a generic wxWindows dialog.
30
31wxTextEntryDialog()
32----------------------------------
33
34wxTextEntryDialog(wxWindow* parent, const wxString& message, const wxString& caption = "Please enter text", const wxString& defaultValue = "", long style = wxOK | wxCANCEL | wxCENTRE, const wxPoint& pos = wxDefaultPosition)
35
36Constructor. Use wxTextEntryDialog::ShowModal to show the dialog.
37
38Parameters
39-------------------
40
41parent = Parent window.
42
43message = Message to show on the dialog.
44
45defaultValue = The default value, which may be the empty string.
46
47style = A dialog style, specifying the buttons (wxOK, wxCANCEL) and an optional wxCENTRE style.
48
49pos = Dialog position.
50"""