> Yes, but it's more complicated than you think :-( > > You need to arrange for your drawing area to be "focusable", and it > has to be able to indicate to the user that it has the keyboard focus. > You need to subclass drawingarea and implement > size_request/size_allocate (allow space for the focus indicator), > expose_event (draw the focus indicator plus any drawing you do), event > (grab the focus on left-click), set the GTK_CAN_FOCUS flag in init, > and gtk_widget_add_events(GDK_KEY_PRESS_MASK).
Imho, when the focus indicator is not needed or can be handled in the display of the drawing area itself, you should not need to subclass, just set CAN_FOCUS and MASK. Carsten _______________________________________________ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list