Always let DefWndProc() process column resizing in wxListCtrl

If we don't pass these messages to it, the selected items highlight
rectangle doesn't get updated when the columns are resized when using
visual themes, as could be seen in the listctrl sample.

While this did work if the wxEVT_LIST_COL_DRAGGING event handler skipped
the event, prefer to not require doing this as things work without this
call to wxEvent::Skip() under the other platforms and even MSW with
themes disabled.

Closes #18032.
This commit is contained in:
Vadim Zeitlin 2017-12-25 17:14:56 +01:00
parent 0df05d5377
commit 610c164988

View File

@ -2716,6 +2716,12 @@ bool wxListCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result)
// --------------- // ---------------
switch ( nmhdr->code ) switch ( nmhdr->code )
{ {
case HDN_ITEMCHANGING:
// Always let the default handling of this event take place,
// otherwise the selected items are not redrawn to correspond to
// the new column widths, see #18032.
return false;
case LVN_DELETEALLITEMS: case LVN_DELETEALLITEMS:
// always return true to suppress all additional LVN_DELETEITEM // always return true to suppress all additional LVN_DELETEITEM
// notifications - this makes deleting all items from a list ctrl // notifications - this makes deleting all items from a list ctrl