943,749 Members | Top Members by Rank

Ad:
  • Python Discussion Thread
  • Unsolved
  • Views: 2073
  • Python RSS
Oct 24th, 2007
0

Move window in PYGTK

Expand Post »
hi evrybody,
what is my broblem in this code ?
Python Syntax (Toggle Plain Text)
  1. #!/usr/bin/env python
  2. import pygtk
  3. pygtk.require('2.0')
  4. import gtk
  5. import time
  6. import os,sys
  7. class Example:
  8. def __init__(self):
  9. window = gtk.Window(gtk.WINDOW_TOPLEVEL)
  10. window.connect('destroy', lambda w: gtk.main_quit())
  11. vbox=gtk.VBox(True,0)
  12. window.add(vbox)
  13. vbox.show()
  14. label= gtk.Label()
  15. vbox.pack_start(label,True,True,0)
  16. label.show()
  17. for i in xrange(5) :
  18. window.move(200+i,600)
  19. time.sleep(.1)
  20. label.set_label(str(i))
  21. label.show()
  22. pass
  23. window.show()
  24. def main():
  25. gtk.main()
  26. return
  27. if __name__ == "__main__":
  28. bcb = Example()
  29. main()
i want too move window into for with timer. thanks .
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
tuxworld is offline Offline
2 posts
since Oct 2007
Dec 14th, 2007
0

Re: Move window in PYGTK

You need to show the window before you move it around, otherwise you'll just see where it ends up.
Reputation Points: 115
Solved Threads: 5
Junior Poster
Toba is offline Offline
192 posts
since Jun 2004

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Python Forum Timeline: Python ANTLR need help!
Next Thread in Python Forum Timeline: Passing numpy arrays to C functions





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC