1. wxScrollHelper can be used to scroll only parts of window

2. wxTextCtrl and wxButton size calc adjusted again


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/wxUNIVERSAL@8610 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2000-10-20 20:19:03 +00:00
parent f104f965eb
commit 1f720ce54b
9 changed files with 87 additions and 36 deletions

View File

@@ -276,20 +276,41 @@ void wxScrollHelper::HandleOnScroll(wxScrollWinEvent& event)
m_yScrollPosition += nScrollInc;
}
bool needsRefresh = FALSE;
int dx = 0,
dy = 0;
if (orient == wxHORIZONTAL)
{
if (m_xScrollingEnabled)
m_targetWindow->ScrollWindow(-m_xScrollPixelsPerLine * nScrollInc, 0, (const wxRect *) NULL);
if ( m_xScrollingEnabled )
{
dx = -m_xScrollPixelsPerLine * nScrollInc;
}
else
m_targetWindow->Refresh();
{
needsRefresh = TRUE;
}
}
else
{
if (m_yScrollingEnabled)
m_targetWindow->ScrollWindow(0, -m_yScrollPixelsPerLine * nScrollInc, (const wxRect *) NULL);
if ( m_yScrollingEnabled )
{
dy = -m_yScrollPixelsPerLine * nScrollInc;
}
else
m_targetWindow->Refresh();
{
needsRefresh = TRUE;
}
}
if ( needsRefresh )
{
m_targetWindow->Refresh(GetRect());
}
else
{
m_targetWindow->ScrollWindow(dx, dy, GetRect());
}
#ifdef __WXMAC__
m_targetWindow->MacUpdateImmediately() ;
#endif