#endif // WXDEBUG_REFRESH
wxWindowNative::Refresh(eraseBackground, &rectWin);
+
+ // Refresh all sub controls if any.
+ wxWindowList::Node *node = GetChildren().GetFirst();
+ while ( node )
+ {
+ wxWindow *win = node->GetData();
+ // Only refresh sub controls when it is visible
+ // and when it is in the update region.
+ if(win->IsShown() && wxRegion(rectWin).Contains(win->GetRect()) != wxOutRegion)
+ win->Refresh(eraseBackground, &rectWin);
+
+ node = node->GetNext();
+ }
}
// ----------------------------------------------------------------------------