On Sep 10, 2010, at 10:32 AM, Jacek Kałucki wrote:
> I have problem with certain custom control that handles Esc key.
> Everything works fine, until I put such control on form with
> default cancel button - dButton(CancelButton=True),
> e.g. dabo.lib.datanav.Form(FormType="Edit").
> If I do so, button Esc key handler always fires first.
> Only solution I imagined is to change CancelButton property
> when control receives focus and restore when loosing it.
> But I don't like it.
> Any other ideas, please?
You could change the button to have CancelButton=False, and then catch
the Esc keypress in the form. The form can then check if the ActiveControl is
your custom control, and call its method if it is; otherwise, it calls the
cancel button's onHit() method.
-- Ed Leafe
_______________________________________________
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]