Re: [gtk-list] button_with_label



>  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



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