[gtkada] Hide before Show?

Marc A. Criley m.criley at earthlink.net
Wed Jan 21 15:00:07 CET 2004


Stephen Leake writes (excerpted):

> If Glade inserted the proper calls to Show in the first place (in
> response to the Glade option box you mentioned), it would not be an issue.
>
> In my non-Glade code, I do call "show" for every Gtk_New (unless I
> don't want it shown, of course). For a while, I tried using Show_All
> once, but there are always some you want hidden; it's best to document
> that decision at each call to Gtk_New.

For me, I've always wanted all the widgets in a window dialog displayed,
that's why I put them in there.  This latest experience is the first time
I've ever wanted to sometimes have one hidden.  I'd figured that since I
could set sensitivity, a GEntry's initial text, and so on, I'd be able to
preset the visibility of a widget as well.  Perhaps a better name than
"Set_Visible" for such a function is "Set_Visibility"?

> Sounds like a Glade issue to me; it's not putting in the calls to
> "show" that it should.

Now perhaps I'm mistaken here, but I think I recall reading something that
if you use a sequence of Show calls that you might end up "watching the GUI
being constructed"; versus a Show_All where the whole thing pops onto the
display at once.

My GUIs tend to have a lot of post-Gtk_New tweaking done to them--such as
setting widget sensitivities and GEntry contents--so I like being able to
construct the whole thing with a single Glade-generated Gtk_New call,
configure it as needed, and then throw it up on the screen with a Show_All.

Marc A. Criley
McKae Technologies





More information about the gtkada mailing list