Re: How to change a Label of a button



>here to set the label:
>
>
>gtk_label_set_text(GTK_LABEL(GTK_BIN(you_button)->child),your_text);
>
>
>to get the label
>
>gtk_label_get (GTK_LABEL (GTK_BIN (your_button)->child), &text_in_label);

alternatively:

	GtkWidget *label = gtk_label_new ("");
	GtkWidget *button = gtk_button_new_with_label (label);

	....

	gtk_label_set_text (GTK_LABEL(label), your_text);

this gives you a handle on the label indepedently of the button.

--p



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