How to prevent flickering in ListView when updating a single ListViewItem's text?

前端 未结 10 2207
囚心锁ツ
囚心锁ツ 2020-11-27 04:56

All I want is to update an ListViewItem\'s text whithout seeing any flickering.

This is my code for updating (called several times):

listView.BeginUp         


        
10条回答
  •  栀梦
    栀梦 (楼主)
    2020-11-27 05:49

    This is a shot in the dark, but you could try double buffering the control.

    SetStyle(
      ControlStyles.AllPaintingInWmPaint |
      ControlStyles.UserPaint |
      ControlStyles.DoubleBuffer, true)
    

提交回复
热议问题