I've been having a few issues when testing my wxpython app in wxpython
3.0 (running on python 2.7.8, Ubuntu 14.10 development). It's a
brilliant toolkit, and well done making it so fast!
By the way, I normally develop using 2.8.11, and python 2.7.6, because
that's what was used in Ubuntu and derivatives, at least until Ubuntu
14.10! Here are the problems:
If I create a wx.Choice object and don't set its selection at all, in
wxpython 2.8.11 the first option in the list is selected. In wxpython
3.0.0.0 nothing is selected, it is blank until I make a selection. I'm
not sure whether this one is a bug or an improvement, but at least it's
not difficult for me to fix.
The other issue is if I make a frame and set it to say 300 by 400
pixels, it appears vertically smaller in wxpython 3.0 than it does in
wxpython 2.8!
The good thing is, neither of these are hard to work around, I can
simply check the wx version in python, but I wasn't sure if these were
fixes or new bugs, so could you please let me know?
The other issue is if I make a frame and set it to say 300 by 400
pixels, it appears vertically smaller in wxpython 3.0 than it does in
wxpython 2.8!
Could you post screenshots of this? This sounds very strange! Are you sure the size isn’t changing based on some sizers or something? Are you calling SetSizeHints anywhere?
···
On Monday, September 8, 2014 8:42:37 AM UTC-7, Hamish McIntyre-Bhatty wrote:
I've been having a few issues when testing my wxpython app in wxpython
3.0 (running on python 2.7.8, Ubuntu 14.10 development). It's a
brilliant toolkit, and well done making it so fast!
By the way, I normally develop using 2.8.11, and python 2.7.6, because
that's what was used in Ubuntu and derivatives, at least until Ubuntu
14.10! Here are the problems:
If I create a wx.Choice object and don't set its selection at all, in
wxpython 2.8.11 the first option in the list is selected. In wxpython
3.0.0.0 nothing is selected, it is blank until I make a selection. I'm
not sure whether this one is a bug or an improvement, but at least it's
not difficult for me to fix.
I don't recall any details about this, but my guess is that it is intended to be an improvement. This way it matches the behavior on Windows.
The other issue is if I make a frame and set it to say 300 by 400
pixels, it appears vertically smaller in wxpython 3.0 than it does in
wxpython 2.8!
There was a change made in how the window's decorations (the borders, titlebar, etc. provided by the window manager) are taken into account for window sizes. Previously I think it was always ignored. Now if the WM provides metrics about the decorations then those sizes will be added in. An easy way to make it behave like before if you need it is to use SetClientSize instead of SetSize
Yes the choicebox change makes sense.
I will use SetClientSize where I’ve used SetSize, but I also have this issue when initially creating windows/frames.
Presumably the solution to that is calling SetClientSize everytime I create a new frame - that’s fine.
I’ll post a code snippet and some screenshots if that will help,
but no I don’t use sizers or GetSizeHints, but thanks for your help anyway
Hamish
···
On Monday, September 8, 2014 6:23:38 PM UTC+1, Robin Dunn wrote:
Hamish McIntyre-Bhatty wrote:
Hi,
I’ve been having a few issues when testing my wxpython app in wxpython
3.0 (running on python 2.7.8, Ubuntu 14.10 development). It’s a
brilliant toolkit, and well done making it so fast!
By the way, I normally develop using 2.8.11, and python 2.7.6, because
that’s what was used in Ubuntu and derivatives, at least until Ubuntu
14.10! Here are the problems:
If I create a wx.Choice object and don’t set its selection at all, in
wxpython 2.8.11 the first option in the list is selected. In wxpython
3.0.0.0 nothing is selected, it is blank until I make a selection. I’m
not sure whether this one is a bug or an improvement, but at least it’s
not difficult for me to fix.
I don’t recall any details about this, but my guess is that it is
intended to be an improvement. This way it matches the behavior on Windows.
The other issue is if I make a frame and set it to say 300 by 400
pixels, it appears vertically smaller in wxpython 3.0 than it does in
wxpython 2.8!
There was a change made in how the window’s decorations (the borders,
titlebar, etc. provided by the window manager) are taken into account
for window sizes. Previously I think it was always ignored. Now if the
WM provides metrics about the decorations then those sizes will be added
in. An easy way to make it behave like before if you need it is to use
SetClientSize instead of SetSize