X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c7e7022c2c800a01e0b95d371fb213b0d25e3214..4f2570aaf16049c11fc50d85cb15952e73bbab85:/wxPython/demo/wxTextCtrl.py diff --git a/wxPython/demo/wxTextCtrl.py b/wxPython/demo/wxTextCtrl.py index 66fbd17c53..05f518ee15 100644 --- a/wxPython/demo/wxTextCtrl.py +++ b/wxPython/demo/wxTextCtrl.py @@ -10,6 +10,10 @@ class TestPanel(wxPanel): def OnKillFocus(self, evt): print "OnKillFocus" evt.Skip() + def OnWindowDestroy(self, evt): + print "OnWindowDestroy" + evt.Skip() + def __init__(self, parent, log): wxPanel.__init__(self, parent, -1) @@ -22,7 +26,7 @@ class TestPanel(wxPanel): EVT_CHAR(t1, self.EvtChar) EVT_SET_FOCUS(t1, self.OnSetFocus) EVT_KILL_FOCUS(t1, self.OnKillFocus) - + EVT_WINDOW_DESTROY(t1, self.OnWindowDestroy) l2 = wxStaticText(self, -1, "Passsword") t2 = wxTextCtrl(self, 20, "", size=(125, -1), style=wxTE_PASSWORD) @@ -44,7 +48,7 @@ class TestPanel(wxPanel): t4.SetStyle(44, 47, wxTextAttr("RED", "YELLOW")) points = t4.GetFont().GetPointSize() # get the current size - f = wxFont(points+2, wxROMAN, wxITALIC, wxBOLD, true) + f = wxFont(points+3, wxROMAN, wxITALIC, wxBOLD, true) ## print 'a1', sys.getrefcount(f) ## t4.SetStyle(63, 77, wxTextAttr("BLUE", font=f)) t4.SetStyle(63, 77, wxTextAttr("BLUE", wxNullColour, f))