Re: How to change a Label of a button
- From: Paul Davis <pbd Op Net>
- To: A R Hummaida <Hummaida cs man ac uk>
- Cc: hunchback netcabo pt, gtk-list gnome org
- Subject: Re: How to change a Label of a button
- Date: Tue, 12 Mar 2002 12:40:26 -0500
>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]