[pygtk] Remember window geometry
saeed
saeed.gnu at gmail.com
Sat Aug 15 06:10:03 WST 2009
gtk.Window.get_position()
gtk.Window.move(x, y)
You may manually save position of window on exit in a configuration
file, and restore it when applications starts. As a sample code base:
winPos = None ## later will be (x, y)
try:
exec(file('my_app.conf').read()) ##overwrite default settings
(including winPos)
except:
pass
if winPos!=None:
win.move(*winPos) ## win is a gtk.Window
On 8/14/09, Tobias Weber <towb at celvina.de> wrote:
> Hi,
> when my application is quit and re-launched I want its window to
> appear in the old place at the last size.
>
> gtk.Window.parse_geometry seems a good candiate for the restore, but
> how do I get the values it takes?
>
> The options I found don't seem very robust because of window
> decorations:
> gtk.Widget.get_allocation
> gtk.gdk.Window.get_geometry
> _______________________________________________
> pygtk mailing list pygtk at daa.com.au
> http://www.daa.com.au/mailman/listinfo/pygtk
> Read the PyGTK FAQ: http://faq.pygtk.org/
>
More information about the pygtk
mailing list