Re: changing the label of a button
| From: | Steph | Date: | Wed, 15 May 2002 15:11:45 +0000 |
| Subject: | Re: changing the label of a button | ||
| References: | 1 2 3 4 | Groups: | php.gtk.general |
| Request: | Send a blank email to php-gtk-general+get-1980@lists.php.net to get a copy of this message | ||
You don't need to do that even, GtkButton is descended from GtkBin, and has a single ->child
I also don't understand why you couldn't find this in the manual, it's there OK, in
the intro, and in the constructor page, and in the user notes on the constructor page as a specific
answer to a query.
----- Original Message -----
From: "Henning Sprang" <henning@sprang.de>
Cc: <php-gtk-general@lists.php.net>
Sent: Wednesday, May 15, 2002 2:56 PM
Subject: Re: [PHP-GTK] changing the label of a button
> On Wed, May 15, 2002 at 03:42:42PM +0200, Henning Sprang wrote:
> > ok, i browsed now back until GTKContainer to find out and do it like that:
> >
> > $mychilds = $nextbutton->children();
> > $mychilds[0]->set_text("Ende");
> >
> > this works.
> >
> > but browsing further down showed me, too taht there is a property GtkBin named
> > child, but i wasn#t able to use this one instead.
> >
> > which of both is the better way, and if the better way is accessing the child
> > property of the GtkBin, how can i access it?
>
> it was another error why using the child property didn#t work.
>
> when doing it right the lines:
>
>
> $mylabel = $nextbutton->child;
> $mylabel->set_text("Ende");
>
>
> do exactly the same...
>
> henning
>
> --
> Henning Sprang, henning@sprang.de, http://www.sprang.de/
>
> --
> PHP-GTK General Mailing List (http://gtk.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>