# Dear readers,
#
# In my application, I want to restore the size and position 
# of windows which are stored in an ini-file.
# This is the problem: when using 'move' after the show() 
# function, the window loses it activation/focus.
#
# Doing the move() before the show() doesn't position the 
# window correct. So that's no solution.
# Perhaps I can send a mouse-click event to the window 
# after the move() has been done, but the GdkEventButton 
# class seems not to be available in PyGTK.
#
# Does anyone have any idea's for me on how to solve this 
# problem?
#
# Greets and best whishes,
# Rene Olsthoorn.
#
# Here a little example which demonstrates the problem:
#
import sys, pygtk
pygtk.require("2.0")
import gtk, gtk.gdk
window = gtk.Window()
window.set_border_width(0)
label = gtk.Label("This window is deactivated after a move.")
window.add(label)
window.connect('destroy', lambda win: gtk.main_quit() )

window.show_all()
window.move(80,80)

gtk.main()


-- 
__________________________________________________________
Sign-up for your own FREE Personalized E-mail at Mail.com
http://www.mail.com/?sr=signup

_______________________________________________
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/

Reply via email to