Re: GtkLabel: setting text
- From: Jonathan Blandford <jrb redhat com>
- To: Alberto Cabello Sánchez <alberto unex es>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: GtkLabel: setting text
- Date: 24 Aug 2001 02:37:58 -0400
Alberto Cabello Sánchez <alberto unex es> writes:
Thank you for your quick response. Exactly, the code is:
gchar *text;
gtk_label_get(GTK_LABEL(label),&text);
score=atoi(text);
score++;
sprintf(text,"%d",score);
printf("%s",text);
gtk_label_set(GTK_LABEL(label),text);
The "printf" statement assures me "text" to contain the rigth value.
Are you going right back to the main loop after this? One frequent
mistake is to do a:
for (i = 0; i < 100; i++) {
update_label ();
};
and expect the updated label to appear.
-Jonathan
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]