Re: changing the label of a button
| From: | Suraj | Date: | Wed, 15 May 2002 13:29:50 +0000 |
| Subject: | Re: changing the label of a button | ||
| References: | 1 | Groups: | php.gtk.general |
| Request: | Send a blank email to php-gtk-general+get-1973@lists.php.net to get a copy of this message | ||
Hi,
Henning Sprang wrote on Wed, May 15, 2002 at 03:14:48PM +0200:
hs> is there a way to change the label of a button that is already being shown?
hs>
hs> i get an error that the method "set_text" doesn't exists for a button obeject,
hs> and in the docs there there's neither a property of the button mentioned that
hs> represents it's label nor any method to change it
yes, GtkButton is a container (with just one child). and it holds a
GtkLabel. So you do this by getting the children of the Button, doing a
set_text() on the first (0th) child.
-Suraj
--
+----------------------------------------------<suraj@chennailug.org>--+
| An army that can overcome weaknesses in discipline and |
| strength, sans aversion & poverty, gains the will to win |
| (glory of defense - 9), Thirukkural |
+--<http://www.symonds.net/~suraj/>------------------------------------+