【发布时间】:2011-04-29 16:42:50
【问题描述】:
我将为我的 ListView 行设置另一种颜色。
我看到了this link,但我使用的是 .Net Framework 3.5 SP1,所以我不能使用它。
我使用了以下代码,但 ListView 排序有问题
ListViewItem newListViewItem = new ListViewItem(
new string[] { item.name.ToString(),
item.code.ToString() });
newListViewItem.BackColor = new Color(240,240,240);
newListViewItem.UseItemStyleForSubItems = true;
newListViewItem.Font = new Font("Tahoma", 9);
listView1.Items.Add(newListViewItem);
你能指导我怎么做吗?
【问题讨论】:
标签: c# listview background-color