X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5bd24f724209014da8889d1b225294777f5f856a..593ac33e50ab0b01f6186773fa646104d410f365:/src/generic/vlbox.cpp diff --git a/src/generic/vlbox.cpp b/src/generic/vlbox.cpp index d2e6964fdd..d53213a284 100644 --- a/src/generic/vlbox.cpp +++ b/src/generic/vlbox.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Name: generic/vlbox.cpp +// Name: src/generic/vlbox.cpp // Purpose: implementation of wxVListBox // Author: Vadim Zeitlin // Modified by: @@ -231,7 +231,7 @@ bool wxVListBox::DoSetCurrent(int current) // 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 @@ -371,8 +371,8 @@ void wxVListBox::OnPaint(wxPaintEvent& WXUNUSED(event)) // 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 @@ -380,8 +380,8 @@ void wxVListBox::OnPaint(wxPaintEvent& WXUNUSED(event)) 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); @@ -636,7 +636,7 @@ void wxVListBox::OnLeftDClick(wxMouseEvent& eventMouse) { OnLeftDown(eventMouse); } - + } }