RE: [gtk-list] [Q]: EventBox and key_press_event
- From: "Arjan J. Molenaar" <arjan xirion nl>
- To: "'gtk-list redhat com'" <gtk-list redhat com>
- Subject: RE: [gtk-list] [Q]: EventBox and key_press_event
- Date: Fri, 20 Aug 1999 10:34:58 +0200
I had an equal kind of problem: I had to let a drawingarea catch key events when a window had focus. I use gtk_widget_grab_focus (widget) after the widget is shown to let that widget get the events (there are also scrollbars in my window which work fine!).
Hope this will do the job.
> -----Original Message-----
> From: Preben Randhol [mailto:email@example.com]
> Sent: Friday, August 20, 1999 10:28 AM
> To: firstname.lastname@example.org
> Subject: [gtk-list] [Q]: EventBox and key_press_event
> How do one get the EventBox to register key_press_events?
> I tried the EventBox example in the GTK+ tutorial, and it
> worked. There
> the Eventbox registers button_press_event. I changed the code so that
> the it should register key_press_event instead of button_press_event,
> but this doesn't work. The callback is not called when I press a key.
> Is it possible to get this to work? How? The reason I'm asking is that
> I have a widget that needs to registers keys like PG_down and Up so
> that I can get it to scroll.
> Any help much appreciated.
] [Thread Prev