hi evrybody,
what is my broblem in this code ?

#!/usr/bin/env python
import pygtk
pygtk.require('2.0')
import gtk
import time
import os,sys
class Example:
    def __init__(self):
        window = gtk.Window(gtk.WINDOW_TOPLEVEL)
        window.connect('destroy', lambda w: gtk.main_quit())
        vbox=gtk.VBox(True,0)
        window.add(vbox)
        vbox.show()
        label= gtk.Label()
        vbox.pack_start(label,True,True,0)
        label.show()
        for i in xrange(5) :
            window.move(200+i,600)
            time.sleep(.1)
            label.set_label(str(i))
            label.show()
        pass
        window.show()
def main():
    gtk.main()
    return
if __name__ == "__main__":
    bcb = Example()
    main()

i want too move window into for with timer. thanks .

You need to show the window before you move it around, otherwise you'll just see where it ends up.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.