The GtkButton widget is a container widget
that can hold any valid child widget derived from
GtkWidget. The most commonly used child
widget is a GtkLabel. This is therefore built
into the constructor
as an optional parameter.
The GtkButton widget is mainly used to call
some function when the button is pressed.
To change the label after the button is created, you can use the
children() function
of the container class:
//$obj is the button object
$childs = $obj->children();
$childs[0]->set_text('new button title');
|