Thank you, this worked fine for me!

2008/5/19 Gorshkov <[EMAIL PROTECTED]>:

> Sandra Derbring wrote:
>
>> Hello,
>>
>> I have a problem with a progressbar. I want, for every file I look into,
>> for the bar to show some progress, so that while you wait for the program to
>> finish, the whole time can see the bar moving. When I implement it, all that
>> happens is that the bar gets filled first after the program's finished. How
>> do I make it show during the process?
>>
>> self.progressbar = gtk.ProgressBar()
>> self.progressbar.show()
>>
>> self.step = 1/len(list)
>>
>> for file in list:
>>      self.x += self.step
>>      #do smth with file
>>      self.progressbar.set_fraction(self.x)
>>
>>
>>
>        gtk_progress_bar_set_fraction(pb, dpercent);
>        gtk_progress_bar_set_text(pb, "Your text here");
>        while (gtk_events_pending())
>                gtk_main_iteration();
>
>
>
> what you're missing is to force the updates to occur AT THE TIME, and not
> have them sit in the queue untill you're finished.
>
_______________________________________________
gtk-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/gtk-list

Reply via email to