Re: Changing label in a button



Hi, just try this:

gtk_label_set_text( GTK_LABEL(GTK_BIN(yourtogglebuttonwidget)->child),
"whateveryouwant" );

Some widgets (GtkMenuItem, GtkButton, etc...) are GtkBin. Their only
child is a GtkLabel. So you can acces it with
GTK_LABEL(GTK_BIN(...)->child).

Clement.

Angelo Carpenzano wrote:

Hi,
I have a little problem: I want to change the label of a toggle button
when it is in "toggled" state and restore it when it passes to
"untoggled" state, but I haven't found the way to do this.
Is there anybody can help me?
Thanks,
Angelo.

§
Personal site:   http://web.tiscalinet.it/acarpenzano/
Favourite site:  http://www.softwareplanet.net/
e-mail address: acarpenzano tiscalinet it
§




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]