[wxPython] wxButton strangeness

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[wxPython] wxButton strangeness

andy-224
RedHat Linux 6.0
wxGTK 2.1 snap 9
wxPython 2.3b1
fvwm 1.24r

If I create a button, it comes up with the default size of 80x25.  If I
call SetSize() on that button, the button properly resizes to the new size
(100x75 eg).  As soon as I call SetPosition() on the newly-resized button,
the position of the button does indeed change, however the size reverts
back to the initial 80x25 size.

                    &y

_______________________________________________
wxPython-users maillist  -  [hidden email]
http://starship.python.net/mailman/listinfo/wxpython-users



Reply | Threaded
Open this post in threaded view
|

Re: [wxPython] wxButton strangeness

Stephen Pitts
On Tue, Sep 28, 1999 at 11:31:24AM -0500, [hidden email] wrote:

> RedHat Linux 6.0
> wxGTK 2.1 snap 9
> wxPython 2.3b1
> fvwm 1.24r
>
> If I create a button, it comes up with the default size of 80x25.  If I
> call SetSize() on that button, the button properly resizes to the new size
> (100x75 eg).  As soon as I call SetPosition() on the newly-resized button,
> the position of the button does indeed change, however the size reverts
> back to the initial 80x25 size.
>
>    &y
>
> _______________________________________________
> wxPython-users maillist  -  [hidden email]
> http://starship.python.net/mailman/listinfo/wxpython-users

This doesn't directly answer your question, but:
Why not just use wxBoxSizer or the layout constraints system? You end up
with much easier to read code and buttons that automatically resize
themselves when the window is resized.
--
Stephen Pitts
[hidden email]
webmaster - http://www.mschess.org

_______________________________________________
wxPython-users maillist  -  [hidden email]
http://starship.python.net/mailman/listinfo/wxpython-users



Reply | Threaded
Open this post in threaded view
|

Re: [wxPython] wxButton strangeness

Robin Dunn
In reply to this post by andy-224
> RedHat Linux 6.0
> wxGTK 2.1 snap 9
> wxPython 2.3b1
> fvwm 1.24r
>
> If I create a button, it comes up with the default size of 80x25.  If I
> call SetSize() on that button, the button properly resizes to the new size
> (100x75 eg).  As soon as I call SetPosition() on the newly-resized button,
> the position of the button does indeed change, however the size reverts
> back to the initial 80x25 size.
>

I'll try to duplicate this later this evening...

--
Robin Dunn
Software Craftsman
[hidden email]
http://AllDunn.com/robin/
http://AllDunn.com/wxPython/  Check it out!



_______________________________________________
wxPython-users maillist  -  [hidden email]
http://starship.python.net/mailman/listinfo/wxpython-users