]> git.saurik.com Git - wxWidgets.git/blame - utils/wxPython/demo/wxTextCtrl.py
jconfig.h uses configures results
[wxWidgets.git] / utils / wxPython / demo / wxTextCtrl.py
CommitLineData
cf694132
RD
1
2from wxPython.wx import *
3
4#---------------------------------------------------------------------------
5
6class TestPanel(wxPanel):
7 def __init__(self, parent, log):
8 wxPanel.__init__(self, parent, -1)
9 self.log = log
10
11 wxStaticText(self, -1, "wxTextCtrl", wxPoint(5, 25), wxSize(75, 20))
12 wxTextCtrl(self, 10, "", wxPoint(80, 25), wxSize(150, 20))
13 EVT_TEXT(self, 10, self.EvtText)
14
15 wxStaticText(self, -1, "Passsword", wxPoint(5, 50), wxSize(75, 20))
16 wxTextCtrl(self, 20, "", wxPoint(80, 50), wxSize(150, 20), wxTE_PASSWORD)
17 EVT_TEXT(self, 20, self.EvtText)
18
19 wxStaticText(self, -1, "Multi-line", wxPoint(5, 75), wxSize(75, 20))
20 wxTextCtrl(self, 30, "", wxPoint(80, 75), wxSize(200, 150), wxTE_MULTILINE)
21 EVT_TEXT(self, 30, self.EvtText)
22
23 def EvtText(self, event):
24 self.log.WriteText('EvtText: %s\n' % event.GetString())
25
26
27
28#---------------------------------------------------------------------------
29
30def runTest(frame, nb, log):
31 win = TestPanel(nb, log)
32 return win
33
34#---------------------------------------------------------------------------
35
36
37
38
39overview = """\
40"""