From 061e6f9a3ca9e6c14c7f62d32cca18a57c91286a Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 9 Dec 2017 19:05:35 +0100 Subject: [PATCH] Fix flicker when resizing columns of report-mode MSW wxListCtrl Just turn off background erasing to avoid having horrible flicker which can be seen perfectly well simply by drag-resizing a column in a list control with non-default background colour. See https://github.com/wxWidgets/wxWidgets/pull/374 --- docs/changes.txt | 1 + src/msw/listctrl.cpp | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/docs/changes.txt b/docs/changes.txt index 4b3e200dff..1b7d72f6fb 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -442,6 +442,7 @@ wxMSW: - Fix UTF-32 conversion for non-BMP characters (ARATA Mizuki). - Use correct parent for the native modal dialogs (Andreas Falkenhahn). - Fix layout of wxSlider with wxSL_VALUE_LABEL only (gafatoa). +- Fix flicker when resizing columns of report-mode wxListCtrl. wxOSX/Cocoa: diff --git a/src/msw/listctrl.cpp b/src/msw/listctrl.cpp index ba30bd6e05..d46e7f000d 100644 --- a/src/msw/listctrl.cpp +++ b/src/msw/listctrl.cpp @@ -334,6 +334,10 @@ void wxListCtrl::MSWSetExListStyles() // it seems better to enable it by default than disable LVS_EX_HEADERDRAGDROP ); + + // As we use LVS_EX_DOUBLEBUFFER above, we don't need to erase our + // background and doing it only results in flicker. + SetBackgroundStyle(wxBG_STYLE_PAINT); } WXDWORD wxListCtrl::MSWGetStyle(long style, WXDWORD *exstyle) const