On 2/20/10 10:27 AM, Jacek Kałucki wrote:
> Hi,
>
> I have control with the following onLostFocus event handler:
>
> def __onMyLostFocus(self, evt):
> if True:
> evt.stop()
>
> But control is still loosing focus.
> How to prevent this?
> Any advices please?
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.
You can also use Dabo's field validation to accomplish this.
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]