On Wednesday, June 29, 2011 08:43:22 am John Fabiani wrote: > Hi, > > Lastest Dabo, Python 2.6.5, wxPython 2.8.11, openSUSE 11.3 (also happens on > windows). > > I have a panel that is added to a panel - then both are added to a form. > > So I have self.Parent.Parent.control (dDateTextBox) > > I have the LostFocus event bound to the control. > > The problem is - the value that is in evt.EventData when LostFocus is > triggered is the old value and not the value displayed on the screen in the > control. > > I have never seen this in the past. But from what I can determine it does > not matter what event I use - the value is always the old value. > > This is SWAG: > The method/function I'm calling is called several times from the triggering > of the evt and at some point in the calls the evt.EventData becomes valid. > I'm wondering if the event needs to be set at some different level. > > > What I'm doing: > I have two dates a "from" and a "t"o. The "from date" has to be less than > the "to date". But I can't depend on the lostfocus of the "to date" to be > the date just entered by the user. So how can get this to work. > > Johnf
Below does work. self.oRangeFrom.Bind(wx.EVT_KILL_FOCUS, self.ValidFromRange) I'm not sure why switching to the wx event works but it appears to work where as self.oRangeFrom.bindEvent(dEvents.LostFocus, self.ValidFromRange) do not. Johnf _______________________________________________ Post Messages to: Dabo-users@leafe.com Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users Searchable Archives: http://leafe.com/archives/search/dabo-users This message: http://leafe.com/archives/byMID/201106291045.01678.jo...@jfcomputer.com