Thanks, oarrocha
I want RichTextBox:
1. do not respond to user interaction
2. keep original Forecolor and Backcolor
After "Enabled = false", "BackColor = SystemColors.ControlLightLight" will not work anymore.
You are right... with Enabled = false, it won't work as you want it.
Here is an example, where I dropped a RichTextBox and a Button, and set the button1.Click Event and richTextVBox1.Enter with this code:
private void button1_Click(object sender, EventArgs e)
{
richTextBox1.BackColor = SystemColors.ControlLightLight;
richTextBox1.ReadOnly = !richTextBox1.ReadOnly;
}
private void richTextBox1_Enter(object sender, EventArgs e)
{
RichTextBox obj = (RichTextBox)sender;
if (obj.ReadOnly) GetNextControl(obj, true).Focus();
}
If the richtextbox doesn't has scrollbars, it works like you want it, otherwise, the user has control of the scroll bars