]> git.saurik.com Git - wxWidgets.git/commitdiff
don't use SetScrollbars() as this forces the grid virtual size to always be the multi...
authorVadim Zeitlin <vadim@wxwidgets.org>
Sun, 14 Sep 2008 21:09:31 +0000 (21:09 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sun, 14 Sep 2008 21:09:31 +0000 (21:09 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55625 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/generic/grid.cpp

index bdd93204b5472c16cfe3bd21581fc03d63bac969..28117ab06cc303cd82e2f4d5207330114b9eaad6 100644 (file)
@@ -4689,10 +4689,9 @@ void wxGrid::CalcDimensions()
         y = wxMax( h - 1, 0 );
 
     // do set scrollbar parameters
-    SetScrollbars( m_scrollLineX, m_scrollLineY,
-                   GetScrollX(w), GetScrollY(h),
-                   x, y,
-                   GetBatchCount() != 0);
+    SetScrollRate(m_scrollLineX, m_scrollLineY);
+    m_gridWin->SetVirtualSize(w, h);
+    Scroll(x, y);
 
     // if our OnSize() hadn't been called (it would if we have scrollbars), we
     // still must reposition the children
@@ -6980,8 +6979,8 @@ void wxGrid::OnSize(wxSizeEvent& WXUNUSED(event))
 {
     if (m_targetWindow != this) // check whether initialisation has been done
     {
-        // update our children window positions and scrollbars
-        CalcDimensions();
+        // reposition our children windows
+        CalcWindowSizes();
     }
 }