To: Benjamin.Monate at lri.fr Cc: lablgtk at kaba.or.jp Subject: Re: Accessing labels of GTree.tree_item In-Reply-To: <20010511135448.43d7e413.Benjamin.Monate at lri.fr> References: <20010511135448.43d7e413.Benjamin.Monate at lri.fr> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-Id: <20010511232023F.garrigue at kurims.kyoto-u.ac.jp> Date: Fri, 11 May 2001 23:20:23 +0900 From: Jacques Garrigue Lines: 29 Hello, > I am a new gtk/lablgtk user and I do not understand how to read and change > the labels of a GTree.tree_item element. This could be a FAQ. The ~label: parameters are in fact shortcuts to create a label widget containing the indicated text. With tree items it is a bit more subtle, because there is also an alignment. So what you need is: let item = GTree.tree_item () let ali = GBin.alignment ~x:0. ~xscale:0. ~packing:item#add () let label = GMisc.label ~packing:ali#add ~text:"foo" Then you can change the text with label#set_text. > By the way what are the reasons for GtkCTree not to be interfaced in > lablgtk ? This is a very big widget (lots of methods), and it has a major design flaw, making it hard to make it cooperate properly with memory management. Since anyway it will be obsolete in Gtk-2 (which has a better widget for that), I have no plan to had it. Cheers, --------------------------------------------------------------------------- Jacques Garrigue Kyoto University garrigue at kurims.kyoto-u.ac.jp JG