Move window in PYGTK

Please support our Python advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Oct 2007
Posts: 2
Reputation: tuxworld is an unknown quantity at this point 
Solved Threads: 0
tuxworld tuxworld is offline Offline
Newbie Poster

Move window in PYGTK

 
0
  #1
Oct 24th, 2007
hi evrybody,
what is my broblem in this code ?
  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 .
Reply With Quote Quick reply to this message  
Join Date: Jun 2004
Posts: 192
Reputation: Toba is an unknown quantity at this point 
Solved Threads: 5
Toba's Avatar
Toba Toba is offline Offline
Junior Poster

Re: Move window in PYGTK

 
0
  #2
Dec 14th, 2007
You need to show the window before you move it around, otherwise you'll just see where it ends up.
what? WHAT?
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Python Forum
Thread Tools Search this Thread



Tag cloud for Python
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC