To: stalkern2 at tin.it Cc: lablgtk at kaba.or.jp Subject: Re: Tree and Entry in a file viewer In-Reply-To: <200301221749.18377.stalkern2 at tin.it> References: <200301221451.28097.stalkern2 at tin.it> <20030122155346.28e64617.maxence.guesdon@inria.fr> <200301221749.18377.stalkern2@tin.it> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-Id: <20030123113433Z.garrigue at kurims.kyoto-u.ac.jp> Date: Thu, 23 Jan 2003 11:34:33 +0900 From: Jacques Garrigue Lines: 22 From: Stalkern 2 > OK, so I set everything in order to have an Alignment as the first and sole > child of the Tree_item , and then a label as a child of the Alignment. > > The problem now is that I can't get the child of the Alignment using method > #children; Alignment is recognized to be a GObj.widget and so I can't use > method #children. How can I tell Lablgtk that Alignment is a single-child > Container, and that I need the child? Casts ar available in the Gtk* modules. The general method to convert a GObj.widget to a GBin.alignment is: new GBin.alignment (GtkBin.Alignment.cast w#as_widget) However, since this cast is often needed, an explicit function is defined for that (you can pass it any widget): GBin.alignment_cast : < as_widget : 'a Gtk.obj; .. > -> GBin.alignment Jacques