In wxPython 2.9 the proportion parameter of the wxBoxSizer’s Add method does not work as before.
The width of a field depends on the the field not on the proportion parameter.
See my attached example test29.py.
My second problem with 2.9 is a horizontal scrollbar for the icons in wxListbook.
See DEMO Listbook. How can I get rid of this scrollbar?
In wxPython 2.9 the proportion parameter of the wxBoxSizer's Add method
does not work as before.
The width of a field depends on the the field not on the proportion
parameter.
This is a known and intended change. The sizer now takes into account the min or best size of a widget before dealing with the proportional sizing, instead of ignoring it like before. In 2.8 you could easily have an item that would be smaller than its min/best size because of how the proportion is calculated. Now in 2.9 the item should always be at least its min/best size and then the leftover space is allocated to items based on their proportions.
See my attached example test29.py.
My second problem with 2.9 is a horizontal scrollbar for the icons in
wxListbook.
See DEMO Listbook. How can I get rid of this scrollbar?
I don't see a horizontal scrollbar here when I run that sample, but it may just be a slight miscalculation of the size needed and the listbook is not giving it enough space so the listctrl thinks it needs a horizontal scroller. Please create a ticket about this.
In my example (test29.py) I have entered to all the fields the
following parameter: size=wx.Size(50, -1)
and now it worked like prior to 2.9. Do I have to enter a min/best
size to all my fields?
What is the advantage? What do I understand wrong.
I just want to have a label in top of a field and this label should
start at the same position as the field.
R. Gärtner
···
On 5 Nov., 20:23, Robin Dunn <ro...@alldunn.com> wrote:
This is a known and intended change. The sizer now takes into account
the min or best size of a widget before dealing with the proportional
sizing, instead of ignoring it like before. In 2.8 you could easily
have an item that would be smaller than its min/best size because of how
the proportion is calculated. Now in 2.9 the item should always be at
least its min/best size and then the leftover space is allocated to
items based on their proportions.
This is a known and intended change. The sizer now takes into account
the min or best size of a widget before dealing with the proportional
sizing, instead of ignoring it like before. In 2.8 you could easily
have an item that would be smaller than its min/best size because of how
the proportion is calculated. Now in 2.9 the item should always be at
least its min/best size and then the leftover space is allocated to
items based on their proportions.
In my example (test29.py) I have entered to all the fields the
following parameter: size=wx.Size(50, -1)
and now it worked like prior to 2.9. Do I have to enter a min/best
size to all my fields?
If you want them to be able to be smaller than their best size then yes.
What is the advantage? What do I understand wrong.
The advantage is that now the sizer is not allowed to ignore the best/min size of items that have proportion values > 0. There is a reason that we have those attributes and for the sizer to ignore them was wrong.
I just want to have a label in top of a field and this label should
start at the same position as the field.
A vertical box sizer will help with that, or depending on what else you have on the form a flex grid sizer may be what you want.
···
On 11/5/10 6:20 PM, R.G�rtner wrote:
On 5 Nov., 20:23, Robin Dunn<ro...@alldunn.com> wrote: