diff --git a/src/generic/scrlwing.cpp b/src/generic/scrlwing.cpp index 262230c6a5..f65fb4b487 100644 --- a/src/generic/scrlwing.cpp +++ b/src/generic/scrlwing.cpp @@ -346,6 +346,10 @@ void wxScrollHelper::SetScrollbars(int pixelsPerUnitX, m_targetWindow->SetVirtualSizeHints( noUnitsX * pixelsPerUnitX, noUnitsY * pixelsPerUnitY ); + // The above should arguably be deprecated, this however we still need. + + m_targetWindow->SetVirtualSize( noUnitsX * pixelsPerUnitX, noUnitsY * pixelsPerUnitY ); + if (do_refresh && !noRefresh) m_targetWindow->Refresh(TRUE, GetRect()); diff --git a/src/gtk/scrolwin.cpp b/src/gtk/scrolwin.cpp index 1615405780..4a8dd9490f 100644 --- a/src/gtk/scrolwin.cpp +++ b/src/gtk/scrolwin.cpp @@ -355,6 +355,10 @@ void wxScrolledWindow::SetScrollbars( int pixelsPerUnitX, int pixelsPerUnitY, m_targetWindow->SetVirtualSizeHints( noUnitsX * pixelsPerUnitX, noUnitsY * pixelsPerUnitY ); + // The above should arguably be deprecated, this however we still need. + + m_targetWindow->SetVirtualSize( noUnitsX * pixelsPerUnitX, noUnitsY * pixelsPerUnitY ); + if (!noRefresh) { int new_x = m_xScrollPixelsPerLine * m_xScrollPosition; diff --git a/src/gtk1/scrolwin.cpp b/src/gtk1/scrolwin.cpp index 1615405780..4a8dd9490f 100644 --- a/src/gtk1/scrolwin.cpp +++ b/src/gtk1/scrolwin.cpp @@ -355,6 +355,10 @@ void wxScrolledWindow::SetScrollbars( int pixelsPerUnitX, int pixelsPerUnitY, m_targetWindow->SetVirtualSizeHints( noUnitsX * pixelsPerUnitX, noUnitsY * pixelsPerUnitY ); + // The above should arguably be deprecated, this however we still need. + + m_targetWindow->SetVirtualSize( noUnitsX * pixelsPerUnitX, noUnitsY * pixelsPerUnitY ); + if (!noRefresh) { int new_x = m_xScrollPixelsPerLine * m_xScrollPosition;