BackColor
返回或设置行的背景颜色。
示例
Dim
lvw As
WinForm.ListView
= e.Form.Controls("ListView1")
Dim
nms1()
As
String
=
{"张飞","关羽","张云","马超","黄忠"}
Dim
nms2()
As
String
=
{"庞统","徐庶","孔明","程昱","贾栩"}
For
Each nm
As String
In nms1
Dim vr
As WinForm.ListViewRow
= lvw.Rows.Add()
vr.Text
= nm
vr.BackColor
= Color.Red
vr.ForeColor
= Color.White
Next
For
Each nm
As String
In nms2
Dim vr
As WinForm.ListViewRow
= lvw.Rows.Add()
vr.Text
= nm
vr.BackColor
= Color.Blue
vr.ForeColor
= Color.White
Next