Minor doc updates,

Made resizing a scrolled window function,


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3927 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
1999-10-11 10:48:43 +00:00
parent 738f9e5a12
commit 27d029c722
6 changed files with 41 additions and 13 deletions

View File

@@ -305,10 +305,13 @@ int wxScrolledWindow::CalcScrollInc(wxScrollWinEvent& event)
}
// Adjust the scrollbars - new version.
void wxScrolledWindow::AdjustScrollbars(void)
void wxScrolledWindow::AdjustScrollbars()
{
int w, h;
GetClientSize(&w, &h);
int oldXScroll = m_xScrollPosition;
int oldYScroll = m_yScrollPosition;
if (m_xScrollLines > 0)
{
@@ -353,6 +356,22 @@ void wxScrolledWindow::AdjustScrollbars(void)
m_yScrollPosition = 0;
SetScrollbar (wxVERTICAL, 0, 0, 0, FALSE);
}
if (oldXScroll != m_xScrollPosition)
{
if (m_xScrollingEnabled)
ScrollWindow( m_xScrollPixelsPerLine * (oldXScroll-m_xScrollPosition), 0, (const wxRect *) NULL );
else
Refresh();
}
if (oldYScroll != m_yScrollPosition)
{
if (m_yScrollingEnabled)
ScrollWindow( 0, m_yScrollPixelsPerLine * (oldYScroll-m_yScrollPosition), (const wxRect *) NULL );
else
Refresh();
}
}
// Default OnSize resets scrollbars, if any