[gtkada] focus-in events for a group of widgets

Stephen Leake stephen_leake at acm.org
Tue Aug 24 03:43:36 CEST 2004


"Manuel Op de Coul" <manuel.op.de.coul at eon-benelux.com> writes:

> >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.
> 
> Sounds like a table may be a better choice.

That's probably true. I'm porting this application from Windex (my own
binding to Win32), where I didn't have tables.

> I'd keep an array of all the entry widgets you have, and test which
> one has the focus, I think Gtk.Widget.Has_Focus_Is_Set can be used.
> Then no focus-in event handler is needed.

Hmm. I'm trying to avoid enumerating all the focusable widgets. But if
I can't avoid that, perhaps testing who has the focus is better than
handling lots of focus events. Thanks for the suggestion.

-- 
-- Stephe




More information about the gtkada mailing list