Hi.
I have a wxScrolledWindow containing a wxBoxSizer(wxVERTICAL) which contains several dozen complex wxPanels. Following the wxScrolledWindow example in the demo everything looks nice. Now I want to remove some of the Panels. By calling sizer.Remove(self.FindWindowById(ID)) ; sizer.Layout() I get rid of the Items, but the Sizer does not get smaller. sizer.GetMinSize() actually gets smaller, but sizer.GetSize() stays the same. This means the Scrollbars don't adjust and and the end of the ScrolledWindow I get a gray area.
To mee it seems self.SetVirtualSize(sizer.GetMinSize()) followed by self.AdjustScrollbars() should fix that, but it didn't. In fact after doing self.SetVirtualSize(sizer.GetMinSize()) I found self.GetVirtualSize() is the same as before an is not changed to the value of sizer.GetMinSize().
I've tried every possible comdination of changing sizes of the Windows/Sizer I could think of, but nothing worked out.
Any hints how to fix this?
Max
···
--
Max Dornseif - http://md.hudora.de/blog/categories/originalContent/
University of Bonn, Germany - ars longa, vita brevis!