On Sat, Oct 11, 2008 at 12:40 PM, YyYo <[EMAIL PROTECTED]> wrote: > I just started using GTK#, and until now i did use gtk using Pytgk and > perl-gtk2. > > For learning the GTK# (and C# language), I wrote a simple app which suppose > to show progress bar progress(by separate thread). > The main Idea is that the progress bar will continue to work while the user > cound be able to work with other widget of the GUI simultaneously. > > when I run the app, I can't see any progress of the progress bar, even > though I increase the "fraction" value. I only see movement only when the > "fraction" value equals 1(at the end of the loop)
You need to execute all GUI code on the main loop. So you might write yourself a helper method: void UpdateProgressFraction(float f) { Application.Invoke(delegate { progressbar.Fraction = f; }); } Then use this instead of setting progressbar.Fraction. (Obviously, only do this from other threads as it incurs some overhead.) -- Chris Howie http://www.chrishowie.com http://en.wikipedia.org/wiki/User:Crazycomputers _______________________________________________ Gtk-sharp-list maillist - Gtk-sharp-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/gtk-sharp-list