GTK+ Forums

Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
It is currently Sun Apr 20, 2014 3:14 am

All times are UTC




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: How do I set GTK_CAN_FOCUS flag on the drawing area?
PostPosted: Tue Mar 27, 2012 11:12 pm 
Offline
Familiar Face

Joined: Tue Mar 27, 2012 10:50 pm
Posts: 7
[EDIT: Oops---I think I just found the answer----see end]

I'm trying to write c version of
http://rosettacode.org/wiki/Honeycombs
using gtk+
I plan a new_window with a vbox packing a drawing_area and a label.
The advice at http://developer.gnome.org/gtk/2.24/GtkDrawingArea.html
says
Quote:
To receive keyboard events, you will need to set the GTK_CAN_FOCUS flag on the drawing area

Despite all my header file greps I cannot figure out how to do this.

Well, maybe the trouble is that I'm combining gtk+ with /gtk/2.24/ advice.

You don't happen to have the source code for scribble.c revised for gtk+ with all the deprecated features replaced with current thinking?
[EDIT: still would like to see a complete current version of Scribble.c]

Thanks, Dave.

[EDIT: I walked around some, ate dinner, then grepped a little more.
I will lay odds that the
gtk_widget_set_can_focus
function will help me through this situation.]
[[IT worked!]]


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group