From b7b023c2346d544876688f5b0381a78cf2596323 Mon Sep 17 00:00:00 2001 From: Ron Lee Date: Sun, 10 Nov 2002 09:37:23 +0000 Subject: [PATCH] SetScrollbars needs to actually SetVirtualSize too, now that setting the hints doesn't automatically do it. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@17800 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/generic/scrlwing.cpp | 4 ++++ src/gtk/scrolwin.cpp | 4 ++++ src/gtk1/scrolwin.cpp | 4 ++++ 3 files changed, 12 insertions(+) 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;