diff --git a/src/generic/grid.cpp b/src/generic/grid.cpp index 2e9f4bdc5e..585f0b0a97 100644 --- a/src/generic/grid.cpp +++ b/src/generic/grid.cpp @@ -6901,8 +6901,11 @@ void wxGrid::DrawColLabel(wxDC& dc, int col) { // It is reported that we need to erase the background to avoid display // artefacts, see #12055. - wxDCBrushChanger setBrush(dc, m_colLabelWin->GetBackgroundColour()); - dc.DrawRectangle(rect); + { + wxDCBrushChanger setBrush(dc, m_colLabelWin->GetBackgroundColour()); + wxDCPenChanger setPen(dc, *wxTRANSPARENT_PEN); + dc.DrawRectangle(rect); + } rend.DrawBorder(*this, dc, rect); }