diff --git a/src/msw/listctrl.cpp b/src/msw/listctrl.cpp index 5e27d051cb..0ad159248c 100644 --- a/src/msw/listctrl.cpp +++ b/src/msw/listctrl.cpp @@ -623,7 +623,15 @@ bool wxListCtrl::SetColumnWidth(int col, int width) else if ( width == wxLIST_AUTOSIZE_USEHEADER) width = LVSCW_AUTOSIZE_USEHEADER; - return ListView_SetColumnWidth(GetHwnd(), col, width) != 0; + if ( !ListView_SetColumnWidth(GetHwnd(), col, width) ) + return false; + + // Failure to explicitly refresh the control with horizontal rules results + // in corrupted rules display. + if ( HasFlag(wxLC_HRULES) ) + Refresh(); + + return true; } // ----------------------------------------------------------------------------