]>
git.saurik.com Git - wxWidgets.git/blob - utils/wxPython/demo/wxTextEntryDialog.py
2 from wxPython
.wx
import *
4 #---------------------------------------------------------------------------
6 def runTest(frame
, nb
, log
):
7 dlg
= wxTextEntryDialog(frame
, 'What is your favorite programming language?',
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())
15 #---------------------------------------------------------------------------
29 This class represents a dialog that requests a one-line text string from the user. It is implemented as a generic wxWindows dialog.
32 ----------------------------------
34 wxTextEntryDialog(wxWindow* parent, const wxString& message, const wxString& caption = "Please enter text", const wxString& defaultValue = "", long style = wxOK | wxCANCEL | wxCENTRE, const wxPoint& pos = wxDefaultPosition)
36 Constructor. Use wxTextEntryDialog::ShowModal to show the dialog.
41 parent = Parent window.
43 message = Message to show on the dialog.
45 defaultValue = The default value, which may be the empty string.
47 style = A dialog style, specifying the buttons (wxOK, wxCANCEL) and an optional wxCENTRE style.
49 pos = Dialog position.