I have RichTextBox control with some BASIC TEXT entered. I wish to customize it in a way that, when user will enter or paste some text this would have different font color than the BASIC TEXT.
i was changing SelectionBackColor prperty on KeyDown event, but it occurs also when user tries only to copy part of BASIC TEXT.
private void richTextBox1_KeyDown(object sender, KeyEventArgs e)
{
RichTextBox richTextBox1 = sender as RichTextBox;
richTextBox1.SelectionBackColor = Color.LightCoral;
}
Instead of
KeyDown, useTextChangedevent: