Winforms - How to alternate the color of rows in a ListView control?

后端 未结 6 994
天涯浪人
天涯浪人 2021-01-05 04:33

Using C# Winforms (3.5).

Is it possible to set the row colors to automatically alternate in a listview?

Or do I need to manually set the row color each time

6条回答
  •  一个人的身影
    2021-01-05 04:53

    Set the ListView OwnerDraw property to true and then implement the DrawItem handler. Have a look here : Winforms - How to alternate the color of rows in a ListView control?

提交回复
热议问题