I am filling a wx.notebook panel with X StaticBoxes
Each box sizer is managed by a wx.StaticBoxSizer
I am dynamically generating a wx.ListCtrl and put it inside the
wx.StaticBoxSizer
Then I create a wx.BoxSizer as a sizer master to manage the X StaticBoxes
and add them to it.
FInally i add my sizer_master to the panel.
All fine so far, except that it does not begave the way I want it to ..
I want the wx.StaticBoxes NOT to resize and have a size (i.e. "column
growth") that displays the whole list. Also, when I am adding a lot of boxes
they tend to overlap ....
What am I missing? Am I using the wrong sizer types? Is my 'sizer
design' wrong?
I found my 1st problem I guess ....
I was not aware that when one adds sthg to the sizer, the 2nd argument
is really a proportion statement.
So when I go 1,2,3 .... it will automatically lead to overlapping and 0
means that it cannot be resized ...
I found out about it after coming across: http://wiki.wxpython.org/wxSizer%20in%20python
I am filling a wx.notebook panel with X StaticBoxes
Each box sizer is managed by a wx.StaticBoxSizer
I am dynamically generating a wx.ListCtrl and put it inside the
wx.StaticBoxSizer
Then I create a wx.BoxSizer as a sizer master to manage the X StaticBoxes
and add them to it.
FInally i add my sizer_master to the panel.
All fine so far, except that it does not begave the way I want it to ..
I want the wx.StaticBoxes NOT to resize and have a size (i.e. "column
growth") that displays the whole list. Also, when I am adding a lot of boxes
they tend to overlap ....
What am I missing? Am I using the wrong sizer types? Is my 'sizer
design' wrong?
I found my 1st problem I guess ....
I was not aware that when one adds sthg to the sizer, the 2nd argument
is really a proportion statement.
So when I go 1,2,3 .... it will automatically lead to overlapping and 0
means that it cannot be resized ...
I found my 1st problem I guess ....
I was not aware that when one adds sthg to the sizer, the 2nd argument
is really a proportion statement.
So when I go 1,2,3 .... it will automatically lead to overlapping and 0
means that it cannot be resized ...
I am over it right now... Hoping for a throrough understanding of sizers
... still, ...it's tiresome not to be able to have a simple layout
easily ...
I came across a broken link though: http://wiki.wxpython.org/UsingSizers
points to a broken link in Point 14:LearnSizers1.py
It finds it under 'smiliar page' then though ...
Thanks
You attached an .rtf which is not very useful if one wants to look at
the code and maybe run it.
DIdn't check thoroughly- damn textedit under OSX .... Won't do it again
···
Am 30.09.11 16:22, schrieb werner:
On 09/30/2011 12:48 PM, Tobias Weber wrote:
You might also want to look at the wx.lib.sized_controls - see the
wxPython demo.
Werner
--
--------------------------------------------------
Tobias Weber
CEO
In 2.8 and earlier, if there is not enough space to show all the proportional items then they can be truncated in ways that makes it look like they are overlapping. That has changed in 2.9 as the item's min or best sizes are honored first, and then the leftover space is allocated to the proportional items.
···
On 9/30/11 7:22 AM, werner wrote:
Tobias,
On 09/30/2011 12:48 PM, Tobias Weber wrote:
I found my 1st problem I guess ....
I was not aware that when one adds sthg to the sizer, the 2nd argument
is really a proportion statement.
So when I go 1,2,3 .... it will automatically lead to overlapping and 0
means that it cannot be resized ...
I found my 1st problem I guess ....
I was not aware that when one adds sthg to the sizer, the 2nd argument
is really a proportion statement.
So when I go 1,2,3 .... it will automatically lead to overlapping and 0
means that it cannot be resized ...
I am over it right now... Hoping for a throrough understanding of sizers
... still, ...it's tiresome not to be able to have a simple layout
easily ...
Sizers are a p.... but one wouldn't want not to have them;-) .
Put the attached into some folder and run lists.py.
Resize the frame, why are two lists not growing? Press ctrl-alt-i to bring up the WIT - your friend in finding out why sizers don't do what you tell them to do:-) .
Hope this helps
Werner
P.S.
sizedstaticbox.py is only needed as current sized_controls don't play nicely out of the box with StaticBox's.
Hi Tobias,
Sizers are a p.... but one wouldn't want not to have them;-) .
Ain't that the truth. I've used 5 or 6 different widget placement
schemes over the last 20 years. None of them are perfect, but the wx
sizers are among the best of the bunch.
C++ programmers don't often see the need for sizers. When you create
your layouts in an IDE and place controls visually, you think the
problem is solved. But run that app on a machine with a different DPI
or a different sized screen, and suddenly those fixed layouts look
really, really bad.
···
--
Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.
I will put it to the test right away....
I am planning on putting together resources on sizers since I see it's
popped up repeatedly on the list over the last years.
I also see that there are many VERY old or unmaintained or uncommented
code snippets and 'tutorials' out there which are simply not right (,
... anymore? ... see [wxPython-users] About wiki - LearnSizers* for
example).
I must admit that even in "wx python in action" I find the chapter on
sizers too 'unstructured' and abstract, I'd prefer a matrix that tells
one 'what position what variable does what ...'. Very often in the book its
Once I feel confident enough to having gotten over the things I am still
struggling with I will definitely structure what I found online (and in
book(s)) and have my shot at a sizer tutorial ....
Any other advises more than welcome.
ThanX and Cheers
···
Am 30.09.11 22:42, schrieb werner:
Hi Tobias,
On 09/30/2011 04:49 PM, Tobias Weber wrote:
Am 30.09.11 16:22, schrieb werner:
Tobias,
On 09/30/2011 12:48 PM, Tobias Weber wrote:
I found my 1st problem I guess ....
I was not aware that when one adds sthg to the sizer, the 2nd argument
is really a proportion statement.
So when I go 1,2,3 .... it will automatically lead to overlapping
and 0
means that it cannot be resized ...
I am over it right now... Hoping for a throrough understanding of sizers
... still, ...it's tiresome not to be able to have a simple layout
easily ...
Sizers are a p.... but one wouldn't want not to have them;-) .
Put the attached into some folder and run lists.py.
Resize the frame, why are two lists not growing? Press ctrl-alt-i to
bring up the WIT - your friend in finding out why sizers don't do what
you tell them to do:-) .
Hope this helps
Werner
P.S.
sizedstaticbox.py is only needed as current sized_controls don't play
nicely out of the box with StaticBox's.