How can I mark a found TEXT in my listbox? First I'm searching for contain using this:
bool found = false;
foreach (var item in listBox1.Items)
{
if(item.ToString().Equals("STOP"))
{
found = true;
break;
}
}
if(!found)
mark it in RED.
I want to highlight all the entire TEXT in red after finding the "STOP". Thank you!
You should use the ListBox1_DrawItem to change the text color.
Sample Code:
But I think ListView is better C# : changing listbox row color?