Re: giving composite widget focus
- From: Mark Leisher <mleisher crl nmsu edu>
- To: "gtk-app-devel-list gnome org" <gtk-app-devel-list gnome org>, gtk-list gnome org
- Subject: Re: giving composite widget focus
- Date: Mon, 27 Nov 2000 16:16:12 -0700 (MST)
Davina> I've created a widget that packs a GtkLabel and a GtkEntry into a
Davina> GtkHBox. I'd like to allow the new widget to get focus and to add
Davina> some handling when it does.
[.....]
Davina> Right now, new_widget_draw_focus() just prints out a debugging
Davina> statement. Or it would if it were actually getting called, which
Davina> it's not.
Davina> Can anyone tell me why?
Have you tried having your application call gtk_widget_grab_focus() on the
newly created widget? Sometimes it isn't immediately clear what widget in
your application has the focus when it starts, so you can force the issue this
way.
The focus traversal key, often Tab, should allow you to cycle through until
you get those debugging statements you added. If neither works, then I'm not
sure what the problem is.
-----------------------------------------------------------------------------
Mark Leisher
Computing Research Lab Cinema, radio, television, magazines are a
New Mexico State University school of inattention: people look without
Box 30001, Dept. 3CRL seeing, listen without hearing.
Las Cruces, NM 88003 -- Robert Bresson
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]