This is a migrated thread and some comments may be shown as answers.

Set font Color with RGB

1 Answer 195 Views
RichTextBox
This is a migrated thread and some comments may be shown as answers.
Patrick
Top achievements
Rank 2
Patrick asked on 27 Nov 2012, 06:33 PM
Hi,

Is there a way to change font color with RGB and can apply custom color not just the pre programmed one?

Thanks,

Pat

1 Answer, 1 is accepted

Sort by
0
Accepted
Petya
Telerik team
answered on 28 Nov 2012, 06:10 PM
Hi Pat,

You can create a new Color instance in any way convinient for you and use it in order to change the ForeColor. Here is one of the possible approaches:
Color myRgbColor = new Color();
myRgbColor = Color.FromRgb(0, 255, 0);
this.editor.ChangeTextForeColor(myRgbColor);

I hope this helps!

Greetings,
Petya
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
RichTextBox
Asked by
Patrick
Top achievements
Rank 2
Answers by
Petya
Telerik team
Share this question
or