[wxPython-users] Re: Newbie question about events and event handling

Christopher Barker Chris.Barker at noaa.gov
Fri Nov 2 14:16:14 PDT 2007


Patrick J. Anderson wrote:
> I used the reference to DayPlanner (option1) in my MiniCalendar and I 
> call a method setDate() on planner instance, but how do I update the 
> widget, so it reflects the change?

You'll need to post code showing what the DayPlanner class is/does, and 
how. I see this form your previous post, but I don't see what you do 
with the self.date attribute:

 >> class DayPlanner(ScrolledPanel):
 >>
 >>     def __init__(self, *args, **kwargs):
 >>         ScrolledPanel.__init__(self, *args, **kwargs)
 >>
 >>         self.date = datetime.today()
 >>
 >>         self.SetName('Day Planner')
 >>
 >>         self.fbox = wx.FlexGridSizer(0, 2, 1, 1)
 >>         self.fbox.AddGrowableCol(1)
 >>
 >>         for i in range(1,24):
 >>             self.fbox.AddGrowableRow(i)
 >>
 >>         self._createHeaders()
 >>         self._createRows(h)
 >>
 >>         self.SetSizer(self.fbox)
 >>         self.Layout()
 >>         self.SetupScrolling()
 >>
 >>     ...
 >>
 >>     def setDate(self, date):
 >>         self.date = date



-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R            (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115       (206) 526-6317   main reception

Chris.Barker at noaa.gov




More information about the wxpython-users mailing list