]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/window.cpp
scroll of subwindow confined to rect param
[wxWidgets.git] / src / mac / window.cpp
index bfff87c13d89f7ebff705ac78cfed3b18901f7e5..8fad9699bc916d1c04c295ac515513beba896c3a 100644 (file)
@@ -1278,7 +1278,16 @@ void wxWindowMac::ScrollWindow(int dx, int dy, const wxRect *rect)
         child->GetPosition( &x, &y );
         int w,h;
         child->GetSize( &w, &h );
-        child->SetSize( x+dx, y+dy, w, h );
+        if (rect)
+        {
+            wxRect rc(x,y,w,h);
+            if (rect->Intersects(rc))
+                child->SetSize( x+dx, y+dy, w, h );
+        }
+        else
+        {
+            child->SetSize( x+dx, y+dy, w, h );                
+        }        
     }
     
     Update() ;