[871] in The GTK GIMP ToolKit mailing list archive
[gtk-list] Re: button_with_label
daemon@ATHENA.MIT.EDU (Ian Main)
Fri Aug 29 14:40:35 1997
Date: Fri, 29 Aug 1997 11:40:07 -0700 (PDT)
From: Ian Main <slow@intergate.bc.ca>
To: gtk-list@redhat.com
In-Reply-To: <Pine.SOL.3.95.970829113222.18179A-100000@risksrv1>
Resent-From: gtk-list@redhat.com
Reply-To: gtk-list@redhat.com
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.
--
To unsubscribe: mail -s unsubscribe gtk-list-request@redhat.com < /dev/null