PDA

View Full Version : gtk+ gtk_label_set_text and variable


ementos
October 19th, 2010, 12:41 PM
Hi.
I started to learn GTK in C++ and I have problem with variable.
I want set text of label by text in char variable called zmienna
here is part of my code:

#include <gtk/gtk.h>
#include <time.h>
static gchar zmienna;
...

zmienna = 'J';
g_print("%c",zmienna);
gtk_label_set_text(GTK_LABEL(label), zmienna);
I saw, that g_print function works, but I'd like to change Label content by the variable. Can you help me?
Greet,
Józek

ementos
October 19th, 2010, 12:43 PM
sorry I made mistake, It should be in another forum "Programming talk"