X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d56cebe7a497773d8753ea2ab874c4445bac18dc..4087064a382ca938e9b7889a9aafd6340b54d6c5:/wxPython/demo/wxTextCtrl.py?ds=inline diff --git a/wxPython/demo/wxTextCtrl.py b/wxPython/demo/wxTextCtrl.py index 58d25e7d3a..c27bee37ef 100644 --- a/wxPython/demo/wxTextCtrl.py +++ b/wxPython/demo/wxTextCtrl.py @@ -4,6 +4,13 @@ from wxPython.wx import * #--------------------------------------------------------------------------- class TestPanel(wxPanel): + def OnSetFocus(self, evt): + print "OnSetFocus" + evt.Skip() + def OnKillFocus(self, evt): + print "OnKillFocus" + evt.Skip() + def __init__(self, parent, log): wxPanel.__init__(self, parent, -1) self.log = log @@ -13,6 +20,8 @@ class TestPanel(wxPanel): t1.SetInsertionPoint(0) EVT_TEXT(self, 10, self.EvtText) EVT_CHAR(t1, self.EvtChar) + EVT_SET_FOCUS(t1, self.OnSetFocus) + EVT_KILL_FOCUS(t1, self.OnKillFocus) l2 = wxStaticText(self, -1, "Passsword")