Re: object list - object type
| From: | Andrei Zmievski | Date: | Mon, 12 Mar 2001 20:15:32 +0000 |
| Subject: | Re: object list - object type | ||
| References: | 1 | Groups: | php.gtk |
| Request: | Send a blank email to php-gtk+get-722@lists.php.net to get a copy of this message | ||
On Mon, 12 Mar 2001, Iuri Fiedoruk wrote:
> Hi, I want to creat a button like the "reset" button from html with resets
> all enties and texts on a window.
> My doubts are:
> Is there a command to get all gtk elements of a window?
> something like array_objects = elements($window/box);
It depends on how your windows are built. If you have a vbox inside
window, then doing $vbox->children() will give you back all the widgets
that are inside that vbox.
> If so, is there a command to get the type of this object?
> Something like: $type = gtk_type($object) (returns, entry, box, etc...)
> Those functions should be really usefull, even if they don't exists on gtk,
> it's a good idea implement on php-gtk (embrace and extend? :))
Gtk::type_name($widget->get_type()) will give you a string description
of the object.
-Andrei
"In this age, which believes that there is a short cut to everything,
the greatest lesson to be learned is that the most difficult way is, in
the long run, the easiest."
-Henry Miller, The Books in My Life