Try using theWindow.Layout() instead. I think wxScrolledWindow adds some extra logic there. If that doesn't help then try theWindow.FitInside()
···
On 9/12/12 3:49 PM, Glen Takahashi wrote:
When I called some_sizer.Layout() inside a wxScrolledWindow, it doesn't
update correctly. The size now appears to be correct, but the location
on screen is not relative to the scroll position, only the absolute
position. So, if I am scrolled to the top and call layout, everything
will look normal, but if scroll down 300 pixels, when I call layout, it
will be positioned on the screen 300 pixels too high.
One workaround I have tried, is if I programatically scroll to the top,
run .Layout(), and then scroll back to where I was, but this is less
than optimal.