Q: listView移动鼠标隔行变色
A:
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedBlock.gif)
Code
ListViewItem oldSelectedItem = null;
private void listView1_ItemMouseHover(object sender, ListViewItemMouseHoverEventArgs e)
{
if (oldSelectedItem != null)
{
oldSelectedItem.BackColor = Color.White;
}
e.Item.BackColor = Color.LightSkyBlue;
e.Item.ToolTipText = string.Format("点击搜索\"{0}\"的歌曲", e.Item.Text);
oldSelectedItem = e.Item;
}
posted @
2009-05-13 09:52
东东呛
阅读(
688)
评论()
编辑
收藏
举报