KeysCoder
Member
The rich text box control uses the rtf code 'cf0' to denote default text color. It builds a color table to define other colors which are used in the rtf document in the order in which they appear. If the first colored word is red for instance, the rtf code 'cf1' is used to define red.
Is there a way for me to remove the red coloration in code rather than assigning it a new color? I know I can simply assign it the default color like this:
RichTextBox1.SelectionColor = Color.Black
but the control then assigns a new color to the rtf color table: black=cf2 rather than recognizing that this is the same color as 'cf0'.
I'd rather it not do this because I'm building an application which needs to read the color of words in an rtf document. I can work around the issue but I'm suprised there doesn't seem to be a way to avoid it.
Is there a way for me to remove the red coloration in code rather than assigning it a new color? I know I can simply assign it the default color like this:
RichTextBox1.SelectionColor = Color.Black
but the control then assigns a new color to the rtf color table: black=cf2 rather than recognizing that this is the same color as 'cf0'.
I'd rather it not do this because I'm building an application which needs to read the color of words in an rtf document. I can work around the issue but I'm suprised there doesn't seem to be a way to avoid it.