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

Working With text

1 Answer 95 Views
RichTextBox (obsolete as of Q3 2014 SP1)
This is a migrated thread and some comments may be shown as answers.
Sacha
Top achievements
Rank 1
Sacha asked on 07 Jun 2012, 03:10 PM
Hi,

I have a relatively simple use for the RichTextBox. I'm using it to display log messages in an application.

I will have two types of messages: Information and Errors. I would like to display the error string in red while the information in black.

How can I change the font color as it is being inserted to the box?

Also, can the font and size be changed at design time? I have the standard font and size (8.25) but it looks much bigger than a standard RadTextBox. Also there seems to be some sort of padding above it as there is a large space between lines (something like a line height in HTML).

Thanks in advance.

1 Answer, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 12 Jun 2012, 08:31 AM
Hello Sacha,

Thank you for writing.

The Font setting cannot be introduced at design time. However, you can set the desired styles while inserting the text. Please refer to the "Insert text in RadDocument" snippet of this help article for a sample implementation.

Let us know if you have any other questions.

Greetings,
Stefan
the Telerik team
RadControls for WinForms Q1'12 release is now live! Check out what's new or download a free trial >>
Tags
RichTextBox (obsolete as of Q3 2014 SP1)
Asked by
Sacha
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Share this question
or