Simon Hibbs wrote: > Steve Holden wrote: > > >>It should be quite simple: you need to handle EVT_SET_FOCUS and/or >>EVT_KILL_FOCUS events (documented in the wxPython docs) to know when to >>recaclulate the values. Sounds like that should be enough of a hint to you. > > > I've tried that, but it doesn't work. Here is the test code: > > self.PlantCtrl = wx.TextCtrl(self, -1, "") > > self.Bind(wx.EVT_KILL_FOCUS, self.OnUpdatePlantCtrl, > self.PlantCtrl) > > def OnUpdatePlantCtrl(self, event): > print "set Plant" > > When the control loses focus, I don't get the message in the console. > I'm trapping other events successfuly elsewhere using similar code. > This would probably be a good question for the wxPython list then - you are clearly in some little-known area of swamp ;-)
regards Steve -- Steve Holden +44 150 684 7255 +1 800 494 3119 Holden Web LLC/Ltd http://www.holdenweb.com Skype: holdenweb http://holdenweb.blogspot.com Recent Ramblings http://del.icio.us/steve.holden -- http://mail.python.org/mailman/listinfo/python-list