]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/demo/wxTextCtrl.py
don't try to refresh the menu bar before showing it, fixes crash on startup with...
[wxWidgets.git] / wxPython / demo / wxTextCtrl.py
index 58d25e7d3afdffdeec4dcc4e774da18df4f75c01..c27bee37efb63acb7b32ef800c9728237d0e79e1 100644 (file)
@@ -4,6 +4,13 @@ from wxPython.wx import *
 #---------------------------------------------------------------------------
 
 class TestPanel(wxPanel):
 #---------------------------------------------------------------------------
 
 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
     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)
         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")
 
 
         l2 = wxStaticText(self, -1, "Passsword")