Pulsing ProgressBar with text
August 20, 2007
Here’s a little snippet for a pulsing ProgressBar with changing text.
import gtk import gobject win = gtk.Window() win.connect("delete_event", lambda x, y: gtk.main_quit()) pb = gtk.ProgressBar() pb.set_pulse_step(.1) win.add(pb) win.show_all() count = .0 def do_pulse(pb, count): pb.pulse() pb.set_text("Step: %.2f" % count) count += .01 gobject.timeout_add(200, do_pulse, pb, count) gobject.timeout_add(200, do_pulse, pb, count) gtk.main()
Nothing special, anyway…
Comments are closed.