From 79aa7172fb375a9581e2d04ed4c443d3d0281763 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Thu, 19 Sep 2002 06:10:53 +0000 Subject: [PATCH] More tweaks for wxTimeCtrl git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@17270 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- wxPython/wxPython/lib/timectrl.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/wxPython/wxPython/lib/timectrl.py b/wxPython/wxPython/lib/timectrl.py index 25a42b9b45..37c15e8c92 100644 --- a/wxPython/wxPython/lib/timectrl.py +++ b/wxPython/wxPython/lib/timectrl.py @@ -79,7 +79,7 @@ class wxTimeCtrl(wxTextCtrl): else: testText = '00:00:00 XXX' w, h = self.GetTextExtent(testText) - self.SetClientSize( (w+4, -1) ) + self.SetClientSize( (w+4, self.GetClientSize().height) ) # Set up all the positions of the cells in the wxTimeCtrl (once): # Format of control is: @@ -133,6 +133,9 @@ class wxTimeCtrl(wxTextCtrl): if spinButton: self.BindSpinbutton(spinButton) # bind spin button up/down events to this control + def __repr__(self): + return "" % self.GetValue() + def SetValue(self, value): """ @@ -202,7 +205,9 @@ class wxTimeCtrl(wxTextCtrl): _dbg('text=', text) wxTextCtrl.SetValue(self, text) _dbg('firing TimeUpdatedEvent...') - self.GetEventHandler().ProcessEvent(TimeUpdatedEvent(self.GetId(), text)) + evt = TimeUpdatedEvent(self.GetId(), text) + evt.SetEventObject(self) + self.GetEventHandler().ProcessEvent(evt) else: _dbg('len_ok:', len_ok, 'separators_correct =', separators_correct) _dbg('hour_ok:', hour_ok, 'min_ok:', min_ok, 'sec_ok:', sec_ok, indent=0)