Flickering in ListView control (OwnerDraw, Virtual)

前端 未结 3 1856
长情又很酷
长情又很酷 2021-02-07 23:08

This question might be considered a follow-up to Flickering in listview with ownerdraw and virtualmode.

I\'ve got a ListView control in Virtu

3条回答
  •  深忆病人
    2021-02-07 23:57

    I've seen this flickering issue with ListView control in any custom rendering event handlers (DrawItem, DrawSubItem). I tried BeginUpdate()/EndUpdate() and double buffering with no success. I think .NET triggers additional WM_PAINT to all columns to the right of the custom drawn column.

    However I found this workaround to a single custom rendered column ListView. It works just fine!

    1. In the columnheader editor, set the custom drawn column as the last column
    2. Change the "DisplayIndex" of the position you want

    This should solve the flickering in mouseover or run-time rendering.

提交回复
热议问题