Hello and thank you very much for mentioned the
timeout_add
I want to have a screen that pops up (splash or
dialog)
and counts down for a certain period and then
dissapears
The follow code is starting to do something of that I
want but when the splash page pops up it doesnt update
the range.
Here is the code
Again all help is very appreciated
#!/usr/bin/python2.2
import pygtk
pygtk.require('2.0')
import gtk
class Splash:
def __init__(self):
self.window = gtk.Window()
self.window.set_title("SPLASH")
self.labelCount = gtk.Label()
self.labelCount.show()
self.window.add(self.labelCount)
gtk.timeout_add(2000, self.window.show)
for x in range(10000):
self.labelCount.set_text("%s" %x)
gtk.timeout_add(5000, self.window.hide)
class Window:
def main(self):
gtk.main()
def __init__(self):
self.window = gtk.Window(gtk.WINDOW_TOPLEVEL)
self.window.set_title("Pay Raintree")
self.window.set_border_width(10)
self.window.show()
#MAIN VERTICAL BOX
self.VboxMain = gtk.VBox(gtk.FALSE,0)
self.VboxMain.show()
self.window.add(self.VboxMain)
self.window.set_border_width(20)
#First Horizontal Box
self.Hbox1 = gtk.HBox(gtk.FALSE,0)
self.Hbox1.show()
self.VboxMain.pack_start(self.Hbox1)
#Label
self.mainLabel = gtk.Label("USER INFO")
self.mainLabel.show()
self.Hbox1.pack_start(self.mainLabel,
gtk.TRUE, gtk.TRUE,0)
#add QUIT BUTTON
self.quitButton = gtk.Button("QUIT")
self.quitButton.connect("clicked", self.quit)
self.quitButton.show()
self.Hbox1.pack_start(self.quitButton,
gtk.TRUE, gtk.TRUE,0)
def quit(self,widget, data = None):
gtk.main_quit()
window = Window()
splash = Splash()
#gtk.timeout_add(2000,splash.window.show)
#gtk.timeout_add(5000, splash.window.hide)
#Unclear that gtk.idle_add is doing here
#gtk.idle_add(window.main())
window.main()
__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com
_______________________________________________
pygtk mailing list [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/