pressing Enter when a wxButton has the focus
Thomas Zehbe
tz at ingenion.de
Thu Oct 5 03:52:25 PDT 2006
Hi Cristina,
The only remaining idea is that the buttons id during runtime is different
from the id used by the EVT_BUTTON macro or the Connect().
Regards,
Thomas
Am Donnerstag, 5. Oktober 2006 12:07 schrieb cai:
> >Hi Christina,
> >
> >Am Donnerstag, 5. Oktober 2006 10:53 schrieb cai:
> > > Hi list,
> > >
> > > when pressing Enter when a wxButton has the focus in a simple custom
> > > wxDialog, the event handler of that button is not called. Also the
> > > dialog's handler for EVT_KEY_DOWN is not called, no matter what key I
> > > press.
> >
> >have you set wxWANTS_CHARS style?
>
> Yes I did, this didn't help either. The buttons on other dialog boxes
> react at Enter when they have the focus and those dialog boxes don't
> have the wxWANTS_CHARS style.
>
> > > Funny thing is that the event handler of that button is called when
> > > it has the focus and I hit <space>.
> >
> ><tab> and <enter> are normally grabed by the operating system.
> >
> > > The buttons in other dialog boxes I wrote react at Enter; I don't see
> > > what has this dialog box so special. Does anybody have any idea please?
> >
> >Is the button in the other app the DefaultItem? The "default button" is
> >"pressed" when you hit <enter>.
> >
> >Regards,
> >
> >Thomas
>
> All buttons in the other dialog boxes react at Enter when they have
> the focus (and of course not all are default buttons...)
>
> Thank you,
>
> Cristina.
--
Dipl.-Ing. Thomas Zehbe
INGENION GmbH
Kuhweide 6
31552 Apelern
Fon: 05043 / 40 57 90 4
Fax: 05043 / 40 57 90 7
More information about the wx-users
mailing list