[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gtk-app-devel
Subject:    Re: key press in drawing area
From:       "K. M. Hawarden-Ogata" <hawarden () duke ! ifa ! hawaii ! edu>
Date:       1999-07-08 20:31:07
[Download RAW message or body]

> >Drawing areas won't become the focus widget by default. I think you will
> >probably need to set the GTK_CAN_FOCUS flag:
> >
> >GTK_WIDGET_SET_FLAGS(widget, GTK_CAN_FOCUS);
> >
> >Then you'll want to set the GTK_HAS_FOCUS flag when you get a
> >focus_in_event and unset it when you get focus_out_event. 
> >
> >Finally, you might want to gtk_widget_grab_focus() when the user clicks
> >the mouse on the drawing area. Users can also move the focus to your
> >drawing area with the arrow keys or Tab.
> >

Did all this and my drawing_area is receiving key press events. Thanks!
But, I am using the arrow key to position something in my drawing
area. The arrow keys moves the focus to the next widget. How can I prevent
this?

/------------------------------------------------------------------------\
| Miranda Hawarden-Ogata             Email: hawarden@irtf.ifa.hawaii.edu |
| NASA IRTF, Institute of Astronomy  Phone: (808) 974-4206               |
| 1175 Manono St., Bldg 393            Fax: (808) 974-4207               |
| Hilo, HI 96720                                                         |
\------------------------------------------------------------------------/



-- 
         To unsubscribe: mail gtk-app-devel-list-request@redhat.com with 
                       "unsubscribe" as the Subject.

	Mailing list concerns should be mailed to <listmaster@redhat.com>

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic