From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,be5526549df2be5c X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!postnews.google.com!a7g2000yqb.googlegroups.com!not-for-mail From: tonyg Newsgroups: comp.lang.ada Subject: Re: gtkada and redrawing Date: Tue, 23 Aug 2011 12:03:38 -0700 (PDT) Organization: http://groups.google.com Message-ID: <3b9d1890-03ce-4644-9ea9-1af4341f53f0@a7g2000yqb.googlegroups.com> References: <42c567ad-1afe-4632-9b89-ae02d6055313@h4g2000vbw.googlegroups.com> NNTP-Posting-Host: 82.46.232.121 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1314126218 15950 127.0.0.1 (23 Aug 2011 19:03:38 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Tue, 23 Aug 2011 19:03:38 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: a7g2000yqb.googlegroups.com; posting-host=82.46.232.121; posting-account=28F2IwkAAACL1Z5nRC-dE7zuvWdbWC7P User-Agent: G2/1.0 X-Google-Web-Client: true X-Google-Header-Order: HUALESNKRC X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux x86_64; en-GB; rv:1.9.2.20) Gecko/20110805 Ubuntu/10.04 (lucid) Firefox/3.6.20,gzip(gfe) Xref: g2news1.google.com comp.lang.ada:20706 Date: 2011-08-23T12:03:38-07:00 List-Id: On Aug 23, 6:49=A0pm, "Dmitry A. Kazakov" 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 finall= y > 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 referenc= e > 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