ProgressBar



Hi Dear All,

I've been lately able to solve all my problems due to not only the
excellent documentation on GTK but also due to your help.
I'm again facing a problem!!!
I'm trying to put a Progress Bar up and running with values between 0
and 1...
The Progress Bar appears in the window but it's not doing anything. When
the proccess starts, the window 'freezes' till the proccess ends, no
progress bar, no nothing...
What I have configured about the PBar is the following:
pbar = gtk_progress_bar_new();
gtk_progress_bar_set_bar_style (GTK_PROGRESS_BAR(pbar),
GTK_PROGRESS_CONTINUOUS);
gtk_progress_bar_set_orientation (GTK_PROGRESS_BAR(pbar),
GTK_PROGRESS_LEFT_TO_RIGHT);
gtk_box_pack_start (GTK_BOX (box2), pbar, FALSE, FALSE, 0);
adj = gtk_adjustment_new(0, 0, 1, 0, 0, 0);
gtk_progress_set_adjustment(GTK_PROGRESS(pbar), adj);
gtk_widget_show(pbar);


And I try to update the Progress Bar by calling this function since my
pbar is a global var:

void set_progress_bar(float value) {
  gtk_progress_set_value (GTK_PROGRESS(pbar), (gfloat)value);
}


Do I need to refresh the window?

TIA,

Best regards,

-- 
+------------------Paulo J. Matos aka PDestroy--------------------+
|  ICQ # 361853  |  http://www.pdestroy.net | pdestroy netcabo pt |
|  http://iascp.sourceforge.net  |  http://mega.ist.utl.pt/~pocm  |
|  "Fixed width font LIVEZ!"     |  "Portability came to rule!"   |
+-----------------------------------------------------------------+




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