Date: Thu, 11 Nov 2004 00:40:34 +0100 (CET) Message-Id: <20041111.004034.21589712.oandrieu at nerim.net> To: zack at bononia.it Cc: lablgtk at kaba.or.jp Subject: Re: GPack.paned: binding status From: Olivier Andrieu In-Reply-To: <20041110223837.GA24157 at fistandantilus.takhisis.org> References: <20041110163203.GA22331 at fistandantilus.takhisis.org> <20041110.182142.104045322.andrieu@ijm.jussieu.fr> <20041110223837.GA24157@fistandantilus.takhisis.org> Mime-Version: 1.0 Content-Type: Multipart/Mixed; boundary="--Next_Part(Thu_Nov_11_00_40_34_2004_710)--" Content-Transfer-Encoding: 7bit ----Next_Part(Thu_Nov_11_00_40_34_2004_710)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit > Stefano Zacchiroli [Wed, 10 Nov 2004]: > On Wed, Nov 10, 2004 at 06:21:42PM +0100, Olivier Andrieu wrote: > > Since the position property is present in gtkPack.props, you can do > > this : > > BTW, I'm still unable to achieve my goal (i.e. imposing a fixed position > for a vertical pane handle relative to the lowest border of containing > window). > > What I would like to do is (pseudo code): > > vpane#set_position (vpane#get_max_position - k) > > with k fixed. > > The problem is that "max-position" property isn't declared in > gtkPack.props. Could it be added, perhaps together with his > "min-position" property? Good, those properties are new in 2.4 but I had missed them. Thanks. But they won't help you at all because they are read-only properties, you cannot set them. I'm not sure I understand what behaviour you want but you probably want to adjust the size requisition of the two widgets and the child properties of the GtkPaned (the resize and shrink optional arguments to the #pack1 and #pack2 methods). Here's a small example. Hope it helps. -- Olivier ----Next_Part(Thu_Nov_11_00_40_34_2004_710)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="paned.ml" let setup packing = let paned = GPack.paned `VERTICAL ~packing () in let top_label = GMisc.label ~text:"This is a label." (* The resize child property is true so this label will expand and shrink when the window is resized. *) ~packing:(paned#pack1 ~resize:true) () in let bottom_label = GMisc.label (* The resize child property is false (the default) so this label will keep its requested size (50) when the window is resized. *) ~text:"This is a label with a height of 50" ~height:50 ~packing:paned#pack2 () in () let main = let w = GWindow.window ~title:"Paned demo" () in ignore (w#connect#destroy GMain.quit) ; setup w#add ; w#show () ; GMain.main () ----Next_Part(Thu_Nov_11_00_40_34_2004_710)----