///////////////////////////////////////////////////////////////////////////////
-// Name: generic/vlbox.cpp
+// Name: src/generic/vlbox.cpp
// Purpose: implementation of wxVListBox
// Author: Vadim Zeitlin
// Modified by:
// it is, indeed, only partly visible, so scroll it into view to
// make it entirely visible
while ( (size_t)m_current == GetLastVisibleLine() &&
- ScrollToLine(GetVisibleBegin()+1) );
+ ScrollToLine(GetVisibleBegin()+1) ) ;
// but in any case refresh it as even if it was only partly visible
// before we need to redraw it entirely as its background changed
// the update rectangle
wxRect rectUpdate = GetUpdateClientRect();
- // Fill it with background colour
- dc.SetBrush(GetBackgroundColour());
+ // fill it with background colour
+ dc.SetBackground(GetBackgroundColour());
dc.Clear();
// the bounding rectangle of the current line
rectLine.width = clientSize.x;
// iterate over all visible lines
- const size_t lineMax = GetLastVisibleLine();
- for ( size_t line = GetFirstVisibleLine(); line <= lineMax; line++ )
+ const size_t lineMax = GetVisibleEnd();
+ for ( size_t line = GetFirstVisibleLine(); line < lineMax; line++ )
{
const wxCoord hLine = OnGetLineHeight(line);
break;
case WXK_PAGEDOWN:
- case WXK_NEXT:
PageDown();
current = GetFirstVisibleLine();
break;
case WXK_PAGEUP:
- case WXK_PRIOR:
if ( m_current == (int)GetFirstVisibleLine() )
{
PageUp();
{
OnLeftDown(eventMouse);
}
-
+
}
}