X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ca298c88524c5c44c38d71af0c1f8ab81543e6a9..cf694132f1c28509a9f84377ce8d374bae4177ad:/utils/wxPython/demo/wxTextCtrl.py?ds=inline diff --git a/utils/wxPython/demo/wxTextCtrl.py b/utils/wxPython/demo/wxTextCtrl.py new file mode 100644 index 0000000000..49eaa00e75 --- /dev/null +++ b/utils/wxPython/demo/wxTextCtrl.py @@ -0,0 +1,40 @@ + +from wxPython.wx import * + +#--------------------------------------------------------------------------- + +class TestPanel(wxPanel): + def __init__(self, parent, log): + wxPanel.__init__(self, parent, -1) + self.log = log + + wxStaticText(self, -1, "wxTextCtrl", wxPoint(5, 25), wxSize(75, 20)) + wxTextCtrl(self, 10, "", wxPoint(80, 25), wxSize(150, 20)) + EVT_TEXT(self, 10, self.EvtText) + + wxStaticText(self, -1, "Passsword", wxPoint(5, 50), wxSize(75, 20)) + wxTextCtrl(self, 20, "", wxPoint(80, 50), wxSize(150, 20), wxTE_PASSWORD) + EVT_TEXT(self, 20, self.EvtText) + + wxStaticText(self, -1, "Multi-line", wxPoint(5, 75), wxSize(75, 20)) + wxTextCtrl(self, 30, "", wxPoint(80, 75), wxSize(200, 150), wxTE_MULTILINE) + EVT_TEXT(self, 30, self.EvtText) + + def EvtText(self, event): + self.log.WriteText('EvtText: %s\n' % event.GetString()) + + + +#--------------------------------------------------------------------------- + +def runTest(frame, nb, log): + win = TestPanel(nb, log) + return win + +#--------------------------------------------------------------------------- + + + + +overview = """\ +"""