Change Font Color of Selection in a RichTextBox - C#, CSharp

dannyhop
dannyhop used Ask the Experts™
on
Does anyone have a C# example of how I change the font color (ForeColor, I think) of the selected text in a RichTextBox?
Is there any difference in how this works if the original characters in the selection are currently different Fore colors?
Thanks
dannyhop
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Commented:
use

richTextBox1.SelectionColor = Color.Red;

It does not get affected by the current ForeColor already set for the richTextBox control;

-Ajitha

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial