Override OnSize in the scrollsub sample to disable
sizer and scrollarea interferance.
Made some code in wxScrolledWindow slightly clearer
and removed a hack for something that shouldn't
happen any more.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32688 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -852,19 +852,12 @@ bool wxScrolledWindow::Layout()
|
||||
// Default OnSize resets scrollbars, if any
|
||||
void wxScrolledWindow::OnSize(wxSizeEvent& WXUNUSED(event))
|
||||
{
|
||||
if( GetAutoLayout() || m_targetWindow->GetAutoLayout() )
|
||||
if ( m_targetWindow->GetAutoLayout() )
|
||||
{
|
||||
if( m_targetWindow != this )
|
||||
m_targetWindow->FitInside();
|
||||
|
||||
FitInside();
|
||||
|
||||
// FIXME: Something is really weird here... This should be
|
||||
// called by FitInside above (and apparently is), yet the
|
||||
// scrollsub sample will get the scrollbar wrong if resized
|
||||
// quickly. This masks the bug, but is surely not the right
|
||||
// answer at all.
|
||||
AdjustScrollbars();
|
||||
wxSize size = m_targetWindow->GetBestVirtualSize();
|
||||
|
||||
// This will call ::Layout() and ::AdjustScrollbars()
|
||||
SetVirtualSize( size );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user