]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/scrolwin.cpp
MSVC 5 does not have BIF_EDITBOX.
[wxWidgets.git] / src / gtk / scrolwin.cpp
index a18ec663f74b831519f6a812720582802fdce575..9a792a679e2fb89d106b26b8f73502b3e41dc66f 100644 (file)
@@ -833,12 +833,19 @@ bool wxScrolledWindow::Layout()
 // Default OnSize resets scrollbars, if any
 void wxScrolledWindow::OnSize(wxSizeEvent& WXUNUSED(event))
 {
-    if( GetAutoLayout() )
+    if( GetAutoLayout() || 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();
     }
     else
     {
@@ -895,7 +902,7 @@ void wxScrolledWindow::OnChar(wxKeyEvent& event)
         yScrollOld = GetScrollPos(wxVERTICAL);
 
     int dsty;
-    switch ( event.KeyCode() )
+    switch ( event.GetKeyCode() )
     {
         case WXK_PAGEUP:
         case WXK_PRIOR: