[Glade-users] gtk_label_set_text fails, but not gtk_label_get_text

Tristan Van Berkom tristan.van.berkom at gmail.com
Fri Nov 9 09:27:24 EST 2007


On Nov 8, 2007 3:04 PM, Stuart Gilbert <stuart.gilbert at gmail.com> wrote:
> Ok, perhaps that makes me look a bit silly.
>
> During the course of debugging it I left the string that I was setting as
> "". Now I've changed it to something else I can tell you that if I have the
> following:
>
>
>  g_print(gtk_label_get_text((GtkLabel*) lblInfo));
>   g_print("\n");
>
>   gtk_label_set_text((GtkLabel*) lblInfo, "Banana");
>
>
>   g_print(gtk_label_get_text((GtkLabel*) lblInfo));
>    g_print("\n");
>
> I get:
>
> Info goes here
> Banana
>
> on the command line.
>
> So the set command is setting the text, but apparently not updating the
> actual label on the interface, for some reason.
>
> Any thoughts?

Sure, firstly this is more of a gtk+ related question than a glade question.

Do you get any runtime errors from your program in the terminal ?

I wonder what your getElement() function is doing, is it also possible
you have more than one label in the interface with the same name ?

-Tristan


More information about the Glade-users mailing list