[gtkada] focus-in events for a group of widgets
Stephen Leake
stephen_leake at acm.org
Sat Aug 21 15:20:50 CEST 2004
I've got an application where I'd like to handle the focus-in event
for a group of widgets in a Hbox. The Hbox represents a record; each
contained widget edits a field in the record. There are several
records displayed at once. I'd like to keep track of the "current"
record (the one the user is editing) by tracking focus-in events.
However, if I connect a handler to the focus-in event for the Hbox, it
never gets called. If I attach a handler to the focus-in event for one
of the widgets in the Hbox, it does get called.
It appears that only widgets that can actually handle keyboard input
get the focus-in event. That makes sense, but it's inconvenient; in
this case, I need to attach a handler to each of the widgets in the
Hbox.
In Win32, _all_ signals are propagated to the parent container; that
makes things like this simpler.
Is there a way to change the Gtk behavior, so I can just handle
focus-in event at the Hbox, instead of in each contained widget?
Alternately, does anyone have another mechanism for keeping track of
the "current" record?
--
-- Stephe
More information about the gtkada
mailing list