Re: GtkProgressBar





I was wanting to add a progress bar to a function, but
the problem is that progress bar is only shown after
the function is over even though the first thing i do
in the function is to show the progress bar.

Is this progress bar for the purpose of showing the progress through a long function?  It may be that the function is not relinquishing control back to gtk.  If that is the case, perhaps you should look at

http://developer.gnome.org/doc/API/2.0/gtk/gtk-General.html

and perhaps use the gtk_main_iteration_do function.  Hope that helps. 

So maybe i should give a delay after showing. Is there
any function which causes a delay, or if someone could
suggest some other idea.

I don't think this will help.  I think this will just que up a bunch of gtk events to be done, but the events won't really get carried out until the next main loop is run through.  But if this is somehow the reason I suppose you can try usleep.  (try man -a 3 usleep).  I am not sure what platform/language you are using or if gtk has its own sleep function.

--
Irtza Sharif

If you can not read, do not write down things you need to remember.
http://www.irtza.com
http://www.geocities.com/irtza
http://ioe.sf.net

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