Again, sorry...Sizer Problem *SIGH*
Joerg Toellner
toellner at oss-gmbh.de
Wed Sep 13 00:10:50 PDT 2006
Dear Group,
Env: wxMSW 2.7, MSVC 2003, Windows XP
I have a sizer problem again. Even after testing 2 days now and reading the
manual, sizer overview and the sizer-howto cant find a solution. Somehow i
cant get this sizer stuff into my head, dunno why.
I have a wxFrame with some sizers and controls in it. The Layout also
includes (as a middle part of other sizers and panels that work correctly
already) the following:
+------------HBoxSizer-------------+
| +---VBoxSizer--+ +--VBoxSizer--+ +
| | Button | | Control1 | |
| | Button | | Control2 | |
| | Button | | Control3 | |
| +--------------+ | Control4 | |
| | Control5 | |
| | Control6 | |
| | ... | |
| +-------------+ |
+----------------------------------+
You see, i have a left vsizer and a right vsizer in the hsizer. The left
vsizer is smaller in height (has less controls in vertical direction) as the
right one. The problem is, that the surrounding HBoxSizer gets always the
vertical size of the smaller left vsizer, clipping some controls from the
right sizer (not visible or overlapping some controls that are located in
another HBoxSizer which is beyond the a.m. HBoxSizer).
If i add a Spacer to the left vsizer with some height, the Hboxsizer grows
vertically to fit the, now higher, left vsizer. Then all the controls from
the right sizer will fit too and are visible.
But i have to calc and try and error to get the correct height of the spacer
to make all fit in and dont waste too much space. This i have to do any
time, when i change sth. on the controls of the right sizer that changes the
right sizer height.
I wonder if there is an automatic way to get the HBoxSizer using the correct
height of the vertically largest vsizer in it, leaving space automatically
at the bottom of the smaller sizer? Indifferent if the higher sizer is the
left or right one? Or must i really calculate how much pixel the additional
spacer must have to get a good fitting size for the HBoxSizer?
Do i anything wrong or is the spacer idea the suggested and only way to go
and there will be no automtic solution for my problem?
Any help really appreciated. Thanks very much in advance
Yours
Jörg Töllner
More information about the wx-users
mailing list