日期:2014-05-17 浏览次数:21233 次
private ListViewItem prItem;
private void listView1_ItemMouseHover(object sender, ListViewItemMouseHoverEventArgs e)
{
if (prItem != null)
{
prItem.BackColor = Color.White;
}
prItem = e.Item;
e.Item.BackColor = Color.Red;
}
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;
}