Re: [gtk-list] button_with_label



On Fri, 29 Aug 1997, Pavel Greenfield wrote:

> 
> How do you change the label of a button after-the-fact?
> 
> For example, I want to have a button whose label is the number of times
> it's been pressed...

I think the easiest way would be to create a new button without a label,
and then pack the label into it (like in the button example).  Then use:

void gtk_label_set (GtkLabel  *label,
                    char      *str);

to change the string.  Use the GTK_LABEL() macro to cast the GtkWidget for
the first argument.

(There's just so much to cover in this tutorial.... )

Regards,

Ian

--

No problem is insoluble in all conceivable circumstances.



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