jaeusm:
Sorry, what I meant was:
Code:
using System;
using System.Windows.Forms;
namespace ChangeTextColor
{
public partial class TestForm : Form
{
public TestForm ()
{
InitializeComponent ();
textBox1.Text = "This is the original text.";
}
private void btn_Click (object sender, EventArgs e)
{
textBox1.Text = "Now the text is red.";
textBox1.ForeColor = System.Drawing.Color.Red;
}
}
}
The "text field of the control" I was referring to is textBox1.Text.
Anyway, it turns out that changing (or just reassigning an unchanged value to) the TextBox's BackColor property when also changing the ForeColor property somehow magically makes it work; don't ask me why.