RE: [gtk-list] Re: Need advice on key_press_event.



> 
> "Arjan J. Molenaar" <arjan@xirion.nl> writes:
> 
> | Hi,
> | 
> | You should call gtk_widget_grab_focus (<canvas widget>) to 
> lead all default events to that widget (I presume you have a 
> GtkDrawingArea as canvas). Note that you have to do that 
> after you realized the widget and it's parent widgets (let's 
> say after a gtk_widget_show_all () ).
> | This works fine for my widget (DiaCanvas at 
> http://web.inter.nl.net/hcc/klem/diacanvas.html).
> 
> This means I have to do the grab_focus every time I have used an
> entry-widget or pressed a button, doesn't it?

I do not hope so... I'm using this function in a window with no other
objects that can get focus (there are just two scrollbars). My test app
has three windows and works just fine, including a window with some spinbuttons.

Have you tried it? Let the canvas do the widget_grab_focus thing and just run it...

I think it works (can't try it since my linux box is about 60km away :-( ).

good luck,

Arjan



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]