catching all control events with one handler?
rory
rorywalsh at gmail.com
Mon Feb 11 06:57:36 PST 2008
On Feb 11, 1:47 pm, va... at wxwidgets.org (Vadim Zeitlin) wrote:
> On Mon, 11 Feb 2008 05:00:39 -0800 (PST) rory <rorywa... at gmail.com> wrote:
>
> r> Is it possible to catch and process all controls events with one event
> r> handler? At the moment I have different events handlers for
> r> scrollbars, comboboxs and checkboxes. I know I can check the type of
> r> control that is sending the event but I'm having problems mixing
> r> command events with scroll events. In my event table I have been using
> r> EVT_MENU and EVT_COMMAND_SCROLL, how do I create an event handler that
> r> handles all events?
>
> If you really need *all* events, you should override ProcessEvent()
> virtual function. But you rarely want to process all of them so usually you
> just use a few event table macros and forward them all to a single handler.
>
> Regards,
> VZ
>
> --
> TT-Solutions: wxWidgets consultancy and technical support
> http://www.tt-solutions.com/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: wx-users-unsubscr... at lists.wxwidgets.org
> For additional commands, e-mail: wx-users-h... at lists.wxwidgets.org
Great but what event table macro can I use? And what event class
should I be passing to my handler? As it stands I have wxScrollEvent
and wxCommandEvent, if I use wxEvent it doesn't seem to work, but then
again I'm not sure what event table macro I should be using. Thanks.
Rory.
More information about the wx-users
mailing list