Re: Can A Drawable Canvas Receive Key Events?
- From: Tristan Van Berkom <tvb gnome org>
- To: Mike Melanson <mike multimedia cx>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: Can A Drawable Canvas Receive Key Events?
- Date: Fri, 30 Mar 2007 16:34:52 -0400
On Fri, 2007-03-30 at 13:02 -0700, Mike Melanson wrote:
Hi,
I have a standalone test app that has nothing inside the main window but
a big, drawable RGB canvas (GtkDrawingArea). I can receive nearly any
kind of event via the canvas: Expose, mouse motion, button
press/release, scroll wheel, etc. However, I *cannot* figure out how to
get key press events. I even added the key up/down events to the
widget's event list using the GDK_KEY_PRESS_MASK and
GDK_KEY_RELEASE_MASK flags passed to gtk_widget_add_events().
Did you add the events to the event mask before the widget was
realized ?
Does the widget in question have keyboard focus at the time
you want to recieve the keyboard events ?
Is the widget in question marked to be focus-capable ?
(i.e. the can-focus bit/property)
Cheers,
-Tristan
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]