Hi,
I am filling a wxScrolledWindow with a lot of sub-panels using this hiearchy:
wxScrolledWindow ->wxBoxSizer(vertical) -> wxPanel
There is about 10 sub panels, totally occupying a virtual height 2-3 times that of the wxScrolledWindow. Each sub panel is of different height, but my problem is that in the scrolled window, after Fit'ing and Layout'ing it, all sub panels are resized to equal height, namely that of the talleest sub panel.
This inserts alot of white space between those who should have been smaller. Am I doing something obviously wrong? Some known problem with wxBoxSizer or wxScrolledWindow?
Thanks for reading all the way to the bottom!
Sizer bug... or programmer bug...? Topic is solved
-
- I live to help wx-kind
- Posts: 153
- Joined: Fri Feb 11, 2005 9:05 am
- Location: Stockholm, Sweden
Sizer bug... or programmer bug...?
/Michael Ljunggren, developer
Peavey Electronics
Windows: 2.6.3, 2.8.9 (VS2005) ** Mac: 2.6.3 (XCode 3) ** WinCE: 2.8.9 (VS2005), ** GTK: 2.8.9 (Kdevelop)
Peavey Electronics
Windows: 2.6.3, 2.8.9 (VS2005) ** Mac: 2.6.3 (XCode 3) ** WinCE: 2.8.9 (VS2005), ** GTK: 2.8.9 (Kdevelop)
-
- I live to help wx-kind
- Posts: 153
- Joined: Fri Feb 11, 2005 9:05 am
- Location: Stockholm, Sweden
Perhaps if I knew what it was, but I can't find it in the docs. So do you mean there is a bug in wxBoxSizer that wxFlexBoxSizer can fix?phlox81 wrote:Maybe you should use wxFlexBoxSizer.
/Michael Ljunggren, developer
Peavey Electronics
Windows: 2.6.3, 2.8.9 (VS2005) ** Mac: 2.6.3 (XCode 3) ** WinCE: 2.8.9 (VS2005), ** GTK: 2.8.9 (Kdevelop)
Peavey Electronics
Windows: 2.6.3, 2.8.9 (VS2005) ** Mac: 2.6.3 (XCode 3) ** WinCE: 2.8.9 (VS2005), ** GTK: 2.8.9 (Kdevelop)
wxFlexBoxSizer does not exist, I think he meant wxFlexGridSizer. That one you can select which rows / columns are growable and which are not.
- Jorgen
- Jorgen
Forensic Software Engineer
Netherlands Forensic Insitute
http://english.forensischinstituut.nl/
-------------------------------------
Jorg's WasteBucket
http://www.xs4all.nl/~jorgb/wb
Netherlands Forensic Insitute
http://english.forensischinstituut.nl/
-------------------------------------
Jorg's WasteBucket
http://www.xs4all.nl/~jorgb/wb
-
- I live to help wx-kind
- Posts: 153
- Joined: Fri Feb 11, 2005 9:05 am
- Location: Stockholm, Sweden
Ah, searching the web came up with nothing, so I suppose that was it. I could try wxFlexGridSizer. But still don't understand why all panels grow to equal size? I though they where suppose to shrink to minimum size when Fit'ing?Jorg wrote:wxFlexBoxSizer does not exist, I think he meant wxFlexGridSizer. That one you can select which rows / columns are growable and which are not.
- Jorgen
/Michael Ljunggren, developer
Peavey Electronics
Windows: 2.6.3, 2.8.9 (VS2005) ** Mac: 2.6.3 (XCode 3) ** WinCE: 2.8.9 (VS2005), ** GTK: 2.8.9 (Kdevelop)
Peavey Electronics
Windows: 2.6.3, 2.8.9 (VS2005) ** Mac: 2.6.3 (XCode 3) ** WinCE: 2.8.9 (VS2005), ** GTK: 2.8.9 (Kdevelop)
-
- I live to help wx-kind
- Posts: 153
- Joined: Fri Feb 11, 2005 9:05 am
- Location: Stockholm, Sweden
This works perfectly! Thanks both. It now looks much betterJorg wrote:wxFlexBoxSizer does not exist, I think he meant wxFlexGridSizer. That one you can select which rows / columns are growable and which are not.
- Jorgen

/Michael Ljunggren, developer
Peavey Electronics
Windows: 2.6.3, 2.8.9 (VS2005) ** Mac: 2.6.3 (XCode 3) ** WinCE: 2.8.9 (VS2005), ** GTK: 2.8.9 (Kdevelop)
Peavey Electronics
Windows: 2.6.3, 2.8.9 (VS2005) ** Mac: 2.6.3 (XCode 3) ** WinCE: 2.8.9 (VS2005), ** GTK: 2.8.9 (Kdevelop)