User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the Python section within the Software Development category of DaniWeb, a massive community of 456,570 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,604 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Python advertiser: Programming Forums
Views: 794 | Replies: 1
Reply
Join Date: Oct 2007
Posts: 2
Reputation: tuxworld is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
tuxworld tuxworld is offline Offline
Newbie Poster

Move window in PYGTK

  #1  
Oct 24th, 2007
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 .
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Jun 2004
Location: Worcester, Massachusetts
Posts: 180
Reputation: Toba is an unknown quantity at this point 
Rep Power: 5
Solved Threads: 3
Toba's Avatar
Toba Toba is offline Offline
Junior Poster

Re: Move window in PYGTK

  #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  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb Python Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the Python Forum

All times are GMT -4. The time now is 5:58 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC