Martin Manns
2014-09-28 20:30:52 UTC
Hi
I am trying to get the main window of my application into the same
position as it was before I closed the application.
Therefore, I get the position from
position = self.main_window.GetScreenPositionTuple()
and save it to a file.
When restarting, I read the file and set the position
self.SetPosition(position)
However, the position is off:
Position before exit: (351, 170)
Position after restart: (350, 141)
The difference looks similar to the border size to me.
I have attached a small example.
How do I set the Window position without such an offset?
My configuration:
Debian testing
Python 2.7.8
wxPython 3.0.1.1 gtk2 (classic)
Window manager E17 0.17.6
A user has reported a similar effect on Windows 8.
Martin
I am trying to get the main window of my application into the same
position as it was before I closed the application.
Therefore, I get the position from
position = self.main_window.GetScreenPositionTuple()
and save it to a file.
When restarting, I read the file and set the position
self.SetPosition(position)
However, the position is off:
Position before exit: (351, 170)
Position after restart: (350, 141)
The difference looks similar to the border size to me.
I have attached a small example.
How do I set the Window position without such an offset?
My configuration:
Debian testing
Python 2.7.8
wxPython 3.0.1.1 gtk2 (classic)
Window manager E17 0.17.6
A user has reported a similar effect on Windows 8.
Martin
--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wxpython-users+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wxpython-users+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.