you can use:
richTextBox1.SelectionColor = Color.Yellow;
richTextBox1.SelectionBackColor = Color.Blue;
To select typing:
richTextBox1.SelectionStart = text_position_in_editor (caret position)
richTextBox1.SelectionLength = text_length
then set SelectionColor ... (all properties starting with Selection ...)
Or you can directly install Rtf property (or richTextBox1.SelectedRtf)that contains formatting information.
Enter the text in WordPad, change its formatting, copy and paste into your RichTextBox, show the value of the Rtf property, you can quickly find out how to satisfy your needs.
source
share