[870] in The GTK GIMP ToolKit mailing list archive

home help back first fref pref prev next nref lref last post

[gtk-list] Re: button_with_label

daemon@ATHENA.MIT.EDU (Federico Mena)
Fri Aug 29 14:29:58 1997

Date: Fri, 29 Aug 1997 13:25:04 -0500
From: Federico Mena <federico@nuclecu.unam.mx>
To: gtk-list@redhat.com
In-reply-to: <Pine.SOL.3.95.970829113222.18179A-100000@risksrv1> (message from
	Pavel Greenfield on Fri, 29 Aug 1997 11:36:47 -0400 (EDT))
Reply-to: federico@nuclecu.unam.mx
Resent-From: gtk-list@redhat.com

>  How do you change the label of a button after-the-fact?

You'll have to crete an empty button, insert a label into it, and
later change the label's text.

	GtkWidget *button, *label;

	button = gtk_button_new();
	label = gtk_label_new("initial string");
	gtk_container_add(GTK_CONTAINER(button), label);
	gtk_widget_show(label);
	gtk_widget_show(button);

	...

	gtk_label_set(GTK_LABEL(label), "changed string");

  Quartic

--
To unsubscribe: mail -s unsubscribe gtk-list-request@redhat.com < /dev/null


home help back first fref pref prev next nref lref last post