Double buffered ListBox

前端 未结 4 1461
轻奢々
轻奢々 2021-02-15 11:16

I have a CheckedListBox (WinForms) control (which inherits from ListBox; googling shows that the problem is with ListBox) that is anchored to all four sides of its form. When t

4条回答
  •  终归单人心
    2021-02-15 11:45

    Although not addressing the specific issue of flickering, a method that is frequently effective for this type of issue is to cache a minimal state of the ListBox items. Then determine whether you need to redraw the ListBox by performing some calculation on each item. Only update the ListBox if at least one item needs to be updated (and of course save this new state in the cache for the next cycle).

提交回复
热议问题