Ive used this code for textbox, but it dont change the color to new color.
When it changed once, then it can't change again.
Anyone got a solution?
When it changed once, then it can't change again.
Anyone got a solution?
Code:
private void textBox1_TextChanged(object sender, EventArgs e)
{
if (textBox1.Text == "Red")
{
textBox1.ForeColor = Color.Red;
}
if (textBox1.Text == " Blue")
{
textBox1.ForeColor = Color.Blue;
}
}