Refresh wxListCtrl with wxLC_HRULES in SetColumnWidth() in wxMSW
This is necessary to avoid corrupted rules display after changing the column
width.
Closes #17158.
(cherry picked from commit 02c8973a57
)
This commit is contained in:
committed by
Dimitri Schoolwerth
parent
fa19bfa239
commit
fd95ab5615
@@ -620,7 +620,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;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
Reference in New Issue
Block a user