more attempts to make wxScrolledWindow to work

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/wxUNIVERSAL@8216 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2000-08-29 21:13:47 +00:00
parent 2026a23167
commit 06be91840a
7 changed files with 123 additions and 36 deletions

View File

@@ -241,12 +241,12 @@ void wxScrolledWindow::OnScroll(wxScrollWinEvent& event)
if (orient == wxHORIZONTAL)
{
int newPos = m_xScrollPosition + nScrollInc;
SetScrollPos(wxHORIZONTAL, newPos, TRUE );
SetScrollPos(wxHORIZONTAL, newPos, FALSE );
}
else
{
int newPos = m_yScrollPosition + nScrollInc;
SetScrollPos(wxVERTICAL, newPos, TRUE );
SetScrollPos(wxVERTICAL, newPos, FALSE );
}
if (orient == wxHORIZONTAL)
@@ -463,6 +463,15 @@ void wxScrolledWindow::PrepareDC(wxDC& dc)
dc.SetDeviceOrigin( -m_xScrollPosition * m_xScrollPixelsPerLine,
-m_yScrollPosition * m_yScrollPixelsPerLine );
dc.SetUserScale( m_scaleX, m_scaleY );
// for wxUniversal we need to set the clipping region to avoid overwriting
// the scrollbars with the user drawing
#ifdef __WXUNIVERSAL__
wxSize size = GetClientSize();
dc.SetClippingRegion(m_xScrollPosition * m_xScrollPixelsPerLine,
m_yScrollPosition * m_yScrollPixelsPerLine,
size.x, size.y);
#endif // __WXUNIVERSAL__
}
#if WXWIN_COMPATIBILITY