gtk progress bar and gdk_flush()
- From: "Tom Liu" <tom liu flextrade com>
- To: <gtk-app-devel-list gnome org>
- Subject: gtk progress bar and gdk_flush()
- Date: Fri, 24 Oct 2003 12:01:27 -0400
Hi,
I am working on the progress bar, I can't my progress bar updated in a
loop:
Even the gdk_flush() can't make it update on screen.
int done;
GtkWidget pg;
char msg[100];
for (done=0;done<100;done+=20){
sprintf (msg,"%d was done" , done);
gtk_progress_bar_set_text(GTK_PROGRESS_BAR(pg),msg);
gtk_progress_bar_set_fraction
(GTK_PROGRESS_BAR(pg),(double)(done)/100);
gdk_flush();
sleep(1); // do something take a long time.
}
Thanks.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]