I have a list view and a button that turns the currently selected item's
ForeColor to SystemColors.GrayText
The problem I'm having is that when the user clicks in white space, the
item becomes deselected and the ForeColor turns black (even though it's
still set to GrayText - stepped through to see if it was the case). If
I select a different item instead of selecting nothing the color stays
gray..
What would be causing this? Here's my code for turning the color gray:
private void btn_Delete_Click(object sender, System.EventArgs e)
{
if (listView1.SelectedItems.Count > 0)
{
listView1.SelectedItems[0].ForeColor = SystemColors.GrayText;
}
}