On 2/20/10 10:53 AM, Jacek Kałucki wrote: > Użytkownik Paul McNett napisał: >> A control's LostFocus event fires *after* the next control's GotFocus has >> already >> fired and the new control already has the focus. You'll need to explicitly >> set the >> focus manually, like: >> >> def __onMyLostFocus(self, evt): >> if True: >> self.setFocus() >> >> You may find you need to wrap that setFocus() call in a dabo.ui.callAfter() >> to allow >> the LostFocus cycle to finish first. >> >> > > But setFocus already has delayed call in it.
Okay, I was wrong. I think at one point I was right, but when I test on Linux now I see that LostFocus of the control fires before GotFocus of the new control. >> You can also use Dabo's field validation to accomplish this. >> > > OK, I understand, but here is code from Dabo: > > def __onLostFocus(self, evt): > if not self: > return > if self._lostFocus() is False: > evt.stop() > > It's from dDataControlMixinBase class. Did it works after all you say here? Here's what I was able to whip up to work: http://trac.dabodev.com/wiki/LostFocus1 Paul _______________________________________________ Post Messages to: [email protected] 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/[email protected]
