I've writtent the following code :
我写了以下代码:
this.listView1.Items[i].BackColor = Color.Orange;
this.listView1.Items [i] .BackColor = Color.Orange;
I would like to know how can I refresh my listview so I can see in real time the updated listview. Thanks.
我想知道如何刷新列表视图,以便我可以实时查看更新的列表视图。谢谢。
1 个解决方案
#1
Normally you should not do anything special, and ListView will be redrawn itself when you're changing item's backcolor.
通常你不应该做任何特别的事情,当你改变项目的背景颜色时,ListView会自行重绘。
But anyway, you can use listView1.Refresh();
to force its redrawing.
但无论如何,你可以使用listView1.Refresh();迫使其重绘。
#1
Normally you should not do anything special, and ListView will be redrawn itself when you're changing item's backcolor.
通常你不应该做任何特别的事情,当你改变项目的背景颜色时,ListView会自行重绘。
But anyway, you can use listView1.Refresh();
to force its redrawing.
但无论如何,你可以使用listView1.Refresh();迫使其重绘。