[Glade-users] gtk_label_set_text fails, but not gtk_label_get_text

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

 g_print(gtk_label_get_text((GtkLabel*) lblInfo));

  gtk_label_set_text((GtkLabel*) lblInfo, "Banana");

  g_print(gtk_label_get_text((GtkLabel*) lblInfo));

I get:

Info goes here

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 ?


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