Re: children()

From: Date: Tue, 03 Jul 2001 08:09:32 +0000
Subject: Re: children()
References: 1  Groups: php.gtk 
Request: Send a blank email to php-gtk+get-2035@lists.php.net to get a copy of this message
$children = $window->children(); while(list(,$child) = each($children)) { echo $child->get_name()."\n"; } will return an array of the objects you have in the container by type-name, but not their handles/references which is what's actually needed here. nb it's only possible to have one child in a GtkWindow anyway - usually that child will be a container with multi-child capabilities. You cannot then use set_focus() using the type .. obviously ... it seems unlikely you'd be able to use the array count to get a handle to the child either, correct me if I'm wrong someone. Why don't you have variables on these children? Could you send a snippet of yr code in to the list, please? ----- Original Message ----- From: "Thetten David" <dthetten@hotmail.com> To: <andrei@ispi.net> Cc: <php-gtk@lists.php.net> Sent: Tuesday, July 03, 2001 8:08 AM Subject: Re: [PHP-GTK] children() >On Mon, 02 Jul 2001, Thetten David wrote: > > Hello > > I have a reference on a window and i want to access its children; but in >my > > function there are no variables on those children; how can i access them >to > > change them?(i want to insert text in an entry belonging to my window ) > > is it with the $window->children() function?? > > > > can someone give me a sample because i didn't find any examples about it > >Yes, if $window is a container, $window->children() should give you back >an array of all its children. thanks a lot but how do i know where is the child widget i m looking for? if $children=$window->children() is it in $children[0] or $children['entry1'] ?? (i really need to find docs about php-gtk) david _________________________________________________________________________ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com. -- PHP GTK Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-gtk-unsubscribe@lists.php.net For additional commands, e-mail: php-gtk-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.gtk (#2035) next »