Drawing area force refresh



Hi,

I'm trying to make my own progress bar by drawing to a drawing area widget.

This is my test code.

for(i=0; i < 100; i++)
{
      g_printf("Percent: %d\n", i);
      DrawProgessBar(drawing_area, pixmap, i);
      g_usleep(100000);
}

I have added code to update the drawing_area inside DrawProgressBar but it doesn't refresh in sync with the g_printf. The animation is rather "jerky".

Any ideas on how to make it in sync with the loop?

Thanks










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