m_targetWindow->SetVirtualSize( w, h );
if (do_refresh && !noRefresh)
- m_targetWindow->Refresh(TRUE, GetRect());
-
- // TODO: check if we can use AdjustScrollbars always.
-#ifdef __WXUNIVERSAL__
- AdjustScrollbars();
-#else
- // This is also done by AdjustScrollbars, above
+ m_targetWindow->Refresh(TRUE, GetScrollRect());
+
+#ifndef __WXUNIVERSAL__
+ // If the target is not the same as the window with the scrollbars,
+ // then we need to update the scrollbars here, since they won't have
+ // been updated by SetVirtualSize().
+ if ( m_targetWindow != m_win )
+#endif // !__WXUNIVERSAL__
+ {
+ AdjustScrollbars();
+ }
+#ifndef __WXUNIVERSAL__
+ else
+ {
+ // otherwise this has been done by AdjustScrollbars, above
#ifdef __WXMAC__
- m_targetWindow->MacUpdateImmediately() ;
-#endif
+ m_targetWindow->Update() ;
#endif
+ }
+#endif // !__WXUNIVERSAL__
}
// ----------------------------------------------------------------------------
if ( needsRefresh )
{
- m_targetWindow->Refresh(TRUE, GetRect());
+ m_targetWindow->Refresh(TRUE, GetScrollRect());
}
else
{
- m_targetWindow->ScrollWindow(dx, dy, GetRect());
+ m_targetWindow->ScrollWindow(dx, dy, GetScrollRect());
}
#ifdef __WXMAC__
- m_targetWindow->MacUpdateImmediately() ;
+ m_targetWindow->Update() ;
#endif
}
nScrollInc = noPositions - m_xScrollPosition; // As +ve as we can go
}
else
- m_targetWindow->Refresh(TRUE, GetRect());
+ m_targetWindow->Refresh(TRUE, GetScrollRect());
}
else
{
else
{
// VZ: why do we do this? (FIXME)
- m_targetWindow->Refresh(TRUE, GetRect());
+ m_targetWindow->Refresh(TRUE, GetScrollRect());
}
}
void wxScrollHelper::AdjustScrollbars()
{
#ifdef __WXMAC__
- m_targetWindow->MacUpdateImmediately();
+ m_targetWindow->Update();
#endif
int w = 0, h = 0;
{
if (m_xScrollingEnabled)
m_targetWindow->ScrollWindow( m_xScrollPixelsPerLine * (oldXScroll - m_xScrollPosition), 0,
- GetRect() );
+ GetScrollRect() );
else
- m_targetWindow->Refresh(TRUE, GetRect());
+ m_targetWindow->Refresh(TRUE, GetScrollRect());
}
if (oldYScroll != m_yScrollPosition)
{
if (m_yScrollingEnabled)
m_targetWindow->ScrollWindow( 0, m_yScrollPixelsPerLine * (oldYScroll-m_yScrollPosition),
- GetRect() );
+ GetScrollRect() );
else
- m_targetWindow->Refresh(TRUE, GetRect());
+ m_targetWindow->Refresh(TRUE, GetScrollRect());
}
#ifdef __WXMAC__
- m_targetWindow->MacUpdateImmediately();
+ m_targetWindow->Update();
#endif
}
((y_pos == -1) || (y_pos == m_yScrollPosition))) return;
#ifdef __WXMAC__
- m_targetWindow->MacUpdateImmediately();
+ m_targetWindow->Update();
#endif
int w, h;
if (old_x != m_xScrollPosition) {
m_win->SetScrollPos( wxHORIZONTAL, m_xScrollPosition );
m_targetWindow->ScrollWindow( (old_x-m_xScrollPosition)*m_xScrollPixelsPerLine, 0,
- GetRect() );
+ GetScrollRect() );
}
}
if ((y_pos != -1) && (m_yScrollPixelsPerLine))
if (old_y != m_yScrollPosition) {
m_win->SetScrollPos( wxVERTICAL, m_yScrollPosition );
m_targetWindow->ScrollWindow( 0, (old_y-m_yScrollPosition)*m_yScrollPixelsPerLine,
- GetRect() );
+ GetScrollRect() );
}
}
#ifdef __WXMAC__
- m_targetWindow->MacUpdateImmediately();
+ m_targetWindow->Update();
#endif
}
{
long rc = wxPanel::MSWWindowProc(nMsg, wParam, lParam);
+#ifndef __WXWINCE__
// we need to process arrows ourselves for scrolling
if ( nMsg == WM_GETDLGCODE )
{
rc |= DLGC_WANTARROWS;
}
+#endif
return rc;
}