From: Olivier Andrieu MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Message-ID: <17441.7913.369734.472866 at karryall.dnsalias.org> Date: Wed, 22 Mar 2006 10:54:49 +0100 To: Erik de Castro Lopo Cc: lablgtk at math.nagoya-u.ac.jp Subject: Re: Box packing In-Reply-To: <20060322192654.172c7ea3.ocaml-erikd at mega-nerd.com> References: <20060322192654.172c7ea3.ocaml-erikd at mega-nerd.com> Content-Type: text/plain; charset=us-ascii Content-Length: 1108 Erik de Castro Lopo [Wednesday 22 March 2006] : > > Hi all, > > Some time ago I did some coding with the GTK+ widgets in C. I am > now trying to do something an Ocaml and I'm not finding it any > easier than it was in C :-). > > I'm basically trying to construct something like a text editor > with a menubar at the top, a text are in the middle and scroll > bars to the right and bottom. > > I've tried a bunch of different packing schemes but I have yet > to find a configuration that work as I would like it to under > window resizing operations. The usual way to contol this is via the optional arguments of the #pack method of GPack.hbox and GPack.vbox. In lablgtk, the default value for `expand' is false and for `fill' true (but the fill argument is ignored when expand is false). I'd say on usually wants to have pack at least one child with `expand' turned on; in your text editor example, that would be the text area (or rather its parent container). See the gtk tutorial for a demo of how these options affect packing: http://www.gtk.org/tutorial/x383.html -- Olivier