Rabello wrote:
> while(x<11)/* begin the loop*/
> {
> sprintf(saida,"%d",x);
> label2=lookup_widget(GTK_WIDGET(menuitem),"label1");
> entry2=lookup_widget(GTK_WIDGET(menuitem),"entry1");
> usleep(1000000);/*only a few delay */
> gtk_entry_set_text(GTK_ENTRY(entry2),saida);
> g_print("%s\n",saida);/*only used to see if really passed in this
> line*/
> gtk_entry_set_text(GTK_ENTRY(entry2),saida);
> gtk_label_set_text(label2,saida);
> x++;
> }/*end of the loop
> My goal is put one text in "Text Entry" continuous, print numbers 0
> to 10 inside this "Text Entry", but only last number, the number 10,
> appear inside of "Text Entry" and 'label", PLEASE Someone know how
> update the "Text Entry" inside the loop "while".
In GTK+ widget redraws are not done immediately. They are done in an
idle event handler when there is nothing more important to do.
This means you need to pass control to the event loop occasionally
so that the widgets get redrawn. Try placing this after the
gtk_entry_set_text() call:
while (g_main_iteration(FALSE));
Damon
_______________________________________________
Glade-devel maillist - [EMAIL PROTECTED]
http://lists.helixcode.com/mailman/listinfo/glade-devel