
radRichTextEditor1.BackColor = System.Drawing.Color.White
But it doesn't seem to work in this new editor... is there different code required for the new editor?
12 Answers, 1 is accepted
Thank you for writing.
Here is a sample code snippet demonstrating how to change the back color for the RadRichTextBox and RadRichTextEditor in the latest version:
public
Form1()
{
InitializeComponent();
this
.radRichTextBox1.RichTextBoxElement.BackColor = Color.Yellow;
this
.radRichTextBox1.RichTextBoxElement.DrawFill =
true
;
this
.radRichTextEditor1.RichTextBoxElement.BackColor = Color.Red;
}
I hope this information helps. Should you have further questions, I would be glad to help.
Dess
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

back color and richtext type box color are required diffrent
How can we do that
when we use
this.radRichTextBox1.RichTextBoxElement.BackColor = Color.Yellow;
this.radRichTextBox1.RichTextBoxElement.DrawFill = true;
this.radRichTextEditor1.RichTextBoxElement.BackColor = Color.Red;
it will not work.

Thank you for writing.
RadRichTextBox.PageBackground property indicates what would be the page color. However, it is bound to the RichTextBoxElement.BackColor property. In order to achieve different colors for the RichTextBoxElement itself and the page you need to unbind them first:
this
.radRichTextBox1.LayoutMode = Telerik.WinControls.RichTextBox.Model.DocumentLayoutMode.Paged;
this
.radRichTextBox1.RichTextBoxElement.UnbindProperty(Telerik.WinControls.RichTextBox.RadRichTextBoxElement.PageBackgroundProperty);
this
.radRichTextBox1.RichTextBoxElement.BackColor = Color.Yellow;
this
.radRichTextBox1.RichTextBoxElement.DrawFill =
true
;
this
.radRichTextBox1.RichTextBoxElement.PageBackground = Color.Fuchsia;
I would recommend you to use RadRichTextEditor which has addressed most of the disadvantages of the RadRichTextBox and introduces new features as well.
I hope this information helps. Should you have further questions, I would be glad to help.
Dess
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

To change the backcolor of the RichTextEditor the code is this: radRichTextEditor1.RichTextBoxElement.BackColor = Color.White

Done.As per my Req.
Thanks
Dipan Chikani

Dess,
I am trying to do the same as the original post is trying to accomplish but with the RadRichTextBox. I can't seam to find out how to use the RichTextBoxElement.
Example:
var radRich = new RadRichTextBox();
radRich.RadRichTextBoxElement.BackColor = Color.Blue;
In this example I can't see the RadRichTextBoxElement.... How can I get access of this?
Thanks.
Kevin
Thank you for writing.
I would like to note that RadRichTextBox is obsolete and it is recommended to use the new RadRichTextEditor control which introduces a lot of improvements and new features. However, I have prepared a sample project demonstrating how to change the BackColor of RadRichTextBox.
I hope this information helps. Should you have further questions I would be glad to help.
Regards,
Dess
Telerik

None of these examples are helpful but rather confusing. Im just trying to set the default settings for the new RadRichTextEditor.
I have the editor and I am programmatically binding it to RichTextRibbonBar by means of the AssociatedRichTextEditor method, i.e
rtfRibbonBar.AssociatedRichTextEditor = rtfEditor
However when I start to type in the editor all the text is coming up Red underlined. SO... by using the above examples, I am trying to set these to basic black on white NON-Underlined text and I cannot seem to be able to do that...
eg:
'' oRTFEditor = Telerik.WinControls.UI.RadRichTextEditor
''AND rtfRibbonBar = Telerik.WinControls.UI.RichTextEditorRibbonBar
rtfRibbonBar.AssociatedRichTextEditor = oRTFEditor
oRTFEditor.RichTextBoxElement.UnbindProperty(Telerik.WinControls.RootRadElement.ForeColorProperty)
oRTFEditor.RichTextBoxElement.UnbindProperty(Telerik.WinControls.RootRadElement.FontProperty)
oRTFEditor.RichTextBoxElement.UnbindProperty(Telerik.WinControls.RootRadElement.DefaultSizeProperty)
oRTFEditor.RichTextBoxElement.ChangeFontFamily(New Telerik.WinControls.RichTextEditor.UI.FontFamily("Arial"))
oRTFEditor.RichTextBoxElement.ChangeFontSize(8)
oRTFEditor.RichTextBoxElement.ChangeFontStyle(Telerik.WinControls.RichTextEditor.UI.FontStyles.Normal)
oRTFEditor.RichTextBoxElement.ChangeFontWeight(Telerik.WinControls.RichTextEditor.UI.FontWeights.Normal)
oRTFEditor.RichTextBoxElement.ChangeTextForeColor(Telerik.WinControls.RichTextEditor.UI.Colors.Black)
oRTFEditor.RichTextBoxElement.ChangeUnderlineDecoration(Telerik.WinForms.Documents.UI.TextDecorations.DecorationProviders.UnderlineTypes.None)
oRTFEditor.RichTextBoxElement.BackColor = Color.White
oRTFEditor.RichTextBoxElement.ForeColor = Color.Black
oRTFEditor.DocumentInheritsDefaultStyleSettings = True
BUT its no effect, when I start typing in the editor its ALWAYS red underlined text...I cant find any direct sample in your forums or FAQ to help. Is there some simple idea I am misunderstanding, it shouldn't be this hard and sounds quite simple to do
Thank you for writing.
By default, when you add an empty RadRichTextEditor on the form, the default font is Verdana, 12 and the fore color is normal black. If you have some other initial settings, I suppose that you probably load a document with the specific style. However, when using the provided code snippet for changing the editor's style and the user starts typing, the text is styled as expected. Please refer to the attached gif file illustrating the result on my end. Am I missing something? I have attached my sample project. Could you please specify the exact steps how to reproduce the problem? Alternatively, you can modify the sample project in a way to replicate the undesired style and submit a support ticket where you can provide the modified project. This would be the fastest way to investigate the precise case and assist you further. Thank you.
I am looking forward to your reply.
Regards,
Dess
Telerik by Progress

Thank you for writing back.
It doesn't matter if you set the RichTextEditorRibbonBar.AssociatedRichTextEditor property at design time or at . It is not supposed to affect the style of the currently associated RadRichTextEditor. Providing a sample project in a new support ticket would be greatly appreciated as it would be the fastest way to investigate the precise case and assist you further. Thank you in advance.
If you have any additional questions, please let me know.
Regards,
Dess
Telerik by Progress