added moving subwindow when scrolling (tested in image.cpp )

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2101 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
1999-04-12 13:47:34 +00:00
parent 99cc0158e2
commit 96d5ab4d29
3 changed files with 18 additions and 0 deletions

View File

@@ -3133,6 +3133,14 @@ void wxWindow::ScrollWindow( int dx, int dy, const wxRect* WXUNUSED(rect) )
wxCHECK_RET( m_wxwindow != NULL, "window needs client area for scrolling" );
wxNode *node = m_children.First();
while (node)
{
wxWindow *child = (wxWindow*) node->Data();
child->Move( child->m_x + dx, child->m_y + dy );
node = node->Next();
}
int cw = 0;
int ch = 0;
GetClientSize( &cw, &ch );