SetSize vs GetSize

Demetrios Tsillas <[email protected]> Wed, 24 Apr 2019 07:55:09 -0700 (PDT)
Newsgroups gmane.comp.python.wxpython.devel
Message-ID <[email protected]>
------=_Part_946_485743156.1556117709193
Content-Type: multipart/alternative; 
	boundary="----=_Part_947_519340153.1556117709193"

------=_Part_947_519340153.1556117709193
Content-Type: text/plain; charset="UTF-8"

My app wants to remember its last geometry so it can restore itself to the 
last position and size if it is restarted.

So OnClose I GetSize and GetPosition and save the results in an init file.

OnStart I read this init file and SetSize and SetPosition to restore the 
geometry.

But here's the problem: it appears every time I do this the window gets a 
little bigger.

The reason is that if I SetSize (x, y) and GetSize => (x', y') x' - x > 0 
and y' - y > 0.

On Linux x' - x = 8 and y' - y = 32.

Is there a natural way for me to do the right thing?

I guess I can do the above math OnStart and use the differences to adjust 
the saved values OnClose.

Just wondering if there's a cleaner way.

thanks!!!
-Jim.

-- 
You received this message because you are subscribed to the Google Groups "wxPython-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/d/optout.

------=_Part_947_519340153.1556117709193
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">My app wants to remember its last geometry so it can resto=
re itself to the last position and size if it is restarted.<div><br></div><=
div>So OnClose I GetSize and GetPosition and save the results in an init fi=
le.</div><div><br></div><div>OnStart I read this init file and SetSize and =
SetPosition to restore the geometry.</div><div><br></div><div>But here&#39;=
s the problem: it appears every time I do this the window gets a little big=
ger.</div><div><br></div><div>The reason is that if I SetSize (x, y) and Ge=
tSize =3D&gt; (x&#39;, y&#39;) x&#39; - x &gt; 0 and y&#39; - y &gt; 0.</di=
v><div><br></div><div>On Linux x&#39; - x =3D 8 and y&#39; - y =3D 32.</div=
><div><br></div><div>Is there a natural way for me to do the right thing?</=
div><div><br></div><div>I guess I can do the above math OnStart and use the=
 differences to adjust the saved values OnClose.</div><div><br></div><div>J=
ust wondering if there&#39;s a cleaner way.</div><div><br></div><div>thanks=
!!!</div><div>-Jim.</div><div><br></div></div>

<p></p>

-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;wxPython-dev&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:[email protected]">wxPyth=
[email protected]</a>.<br />
For more options, visit <a href=3D"https://groups.google.com/d/optout">http=
s://groups.google.com/d/optout</a>.<br />

------=_Part_947_519340153.1556117709193--

------=_Part_946_485743156.1556117709193--