From ba7ef3304e200ea3ed40899b3e5b738a2120cf0c Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 18 Aug 2008 12:02:01 +0000 Subject: [PATCH] paint the space remaining after the columns too in wxListHeaderWindow::OnPaint() (#9855) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@55117 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/generic/listctrl.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/generic/listctrl.cpp b/src/generic/listctrl.cpp index b8c7423f2f..77d3ef7aec 100644 --- a/src/generic/listctrl.cpp +++ b/src/generic/listctrl.cpp @@ -1906,6 +1906,19 @@ void wxListHeaderWindow::OnPaint( wxPaintEvent &WXUNUSED(event) ) x += wCol; } + + // Fill in what's missing to the right of the columns, otherwise we will + // leave an unpainted area when columns are removed (and it looks better) + if ( x < w ) + { + wxRendererNative::Get().DrawHeaderButton + ( + this, + dc, + wxRect(x, HEADER_OFFSET_Y, w - x, h), + 0 + ); + } } void wxListHeaderWindow::DrawCurrent()