allow dragging the divider line outside the window

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7601 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2000-06-19 10:21:17 +00:00
parent b09e1f2987
commit c1e56e2c29

View File

@@ -1300,7 +1300,17 @@ void wxListHeaderWindow::OnMouse( wxMouseEvent &event )
if (m_isDragging)
{
// erase the line
// we don't draw the line beyond our window, but we allow dragging it
// there
int w = 0;
GetClientSize( &w, NULL );
#if wxUSE_GENERIC_LIST_EXTENSIONS
m_owner->CalcUnscrolledPosition(w, 0, &w, NULL);
#endif // wxUSE_GENERIC_LIST_EXTENSIONS
w -= 6;
// erase the line if it was drawn
if ( m_currentX < w )
DrawCurrent();
if (event.ButtonUp())
@@ -1308,21 +1318,17 @@ void wxListHeaderWindow::OnMouse( wxMouseEvent &event )
ReleaseMouse();
m_isDragging = FALSE;
m_dirty = TRUE;
m_owner->SetColumnWidth( m_column, m_currentX-m_minX );
m_owner->SetColumnWidth( m_column, m_currentX - m_minX );
}
else
{
int w = 0;
GetClientSize( &w, NULL );
if (x > m_minX + 7)
m_currentX = x;
else
m_currentX = m_minX + 7;
if ( m_currentX > w - 7 )
m_currentX = w - 7;
// draw in the new location
if ( m_currentX < w )
DrawCurrent();
}
}