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

Re: Key Press Events and Widgets



Havoc Pennington wrote:
> 
> On Sun, 29 Nov 1998, SEGV wrote:
> >
> > Is that because they require an X Window to receive the focus? Or can I set the
> > focus myself? My app makes more sense if the main drawing area widget can handle
> > its own key presses....
> >
> 
> I think you need to set the GTK_CAN_FOCUS flag on the drawing aread
> widget. GTK_WIDGET_SET_FLAGS(da, GTK_CAN_FOCUS). I was fooling with this
> and only getting every other up and down arrow key press though. It was
> too weird to I just went and did something else, but if you get the same
> thing let me know...

I found that GTK_CAN_FOCUS flag soon after my original post and am now able to
get key press events in my drawing area widget.

However, as you say I only get every SECOND such event.

Who knows what's going on?

-- 
SEGV    http://www.cgocable.net/~mlepage/



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