Refresh a control
Question
I am trying to change a link label's fore color but the color won't graphically change.
I have a timer that updates the fore color of the control
private void Timer_Tick(object sender, EventArgs e)
{
MyLbl.ForeColor = shouldUpdate? Color.Blue: Color.Gray;
}
The update is successful and while debugging, I can see that the fore color property of myLbl is different. So why doesn't it change it graphically?
I also tried
MyLbl.ForeColor = Color.Gray;
And tried adding Application.DoEvents() after the change of the fore color.
Any solutions?
No correct solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow