前端之家收集整理的这篇文章主要介绍了
[VB.NET]listview的BackColor问题,
前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
listview的BackColor问题 listview中设置单击一行后高亮
显示,可是单击第二次时,第一次单击的结果还在,怎么才能消除掉?,让每单击一次,高亮
显示一行。 __________________________________________________________________________ http://www.syncfusion.com/FAQ/WindowsForms/FAQ_c90c.aspx#q1006q First,How can I tell which column (subitem) has been clicked on in my listview? Second ListViewItem item1 = new ListViewItem( item1,0); //this line makes things work item1.UseItemStyleForSubItems = false; //set fore & back color of next sub item item1.SubItems.Add( 1,Color.Black,Color.LightGreen,Font); item1.SubItems.Add( 44 ); item1.SubItems.Add( 3 ); //As long as UseItemStyleForSubItems is false,you can later set the colors with code such as item1.SubItems[2].BackColor = Color.Pink; __________________________________________________________________________