comp.lang.ada
 help / color / mirror / Atom feed
From: tonyg <tonythegair@gmail.com>
Subject: Re: gtkada and redrawing
Date: Tue, 23 Aug 2011 12:03:38 -0700 (PDT)
Date: 2011-08-23T12:03:38-07:00	[thread overview]
Message-ID: <3b9d1890-03ce-4644-9ea9-1af4341f53f0@a7g2000yqb.googlegroups.com> (raw)
In-Reply-To: pb4tbe8zv6o7.pf1h9wcwrg8d$.dlg@40tude.net

On Aug 23, 6:49 pm, "Dmitry A. Kazakov" <mail...@dmitry-kazakov.de>
wrote:
> On Tue, 23 Aug 2011 07:12:31 -0700 (PDT), tonyg wrote:
> > I have a toggle button and a Gentry in a Hbox. However I only want the
> > Gentry to appear when the toggle button is toggled and I want the
> > toggle button to fill the hbox when it is untoggled. If I use hide
> > then the toggle button stays the same size!
>
> Remove it from the container (Hbox) using Remove (see Gtk.Container). Add
> it back when needed. Do not forget to use Pack_Start/End for the button
> with Fill and Expand set to true.
>
> If you don't want to create the entry anew each time you need it, you can
> Ref it. But do not forget to call Unref when Hbox or its container finally
> disappear. There are many ways to do this. You can connect to Gtk_Box's
> "destroy", you can derive from it your own type and place a hard reference
> to the entry into it upon Initialize etc.
>
> P.S. Actually it is always a good idea to derive new widgets from Gtk
> containers. It looks as an overkill, but in a long run it pays off.
>
> --
> Regards,
> Dmitry A. Kazakovhttp://www.dmitry-kazakov.de

Thanks Dmitry



      reply	other threads:[~2011-08-23 19:03 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-23 14:12 gtkada and redrawing tonyg
2011-08-23 17:49 ` Dmitry A. Kazakov
2011-08-23 19:03   ` tonyg [this message]
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox