New to Telerik UI for WinForms? Download free 30-day trial

RadRichTextEditorRuler

RadRichTextEditorRuler is a control providing ruler functionality to RadRichTextEditor. The rulers allow you to change the paragraph, page margins or align the paragraphs in the document.

WinForms RadRichTextEditor RadRichTextEditorRuler Overview

Rulers only apply to the Paged document layout mode of the RadRichtextEditor.

Using the RadRichTextEditorRuler at design time

Since RadRichTextEditorRuler is a separate control it is available in the toolbox. Here is how to put it in action:

1. Drag and drop RadRichTextEditorRuler on the form.

2. Drag and drop RadRichTextEditor inside the RadRichTextEditorRuler..

3. Set the AssociatedRichTextBox property in the properties window.

WinForms RadRichTextEditor RadRichTextEditorRuler Properties Window

4. Set the LayoutMode of the RadRichTextEditor to Paged.

Using the RadRichTextEditorRuler programmatically.

You can add the control in code as well. The following snippet demonstrates how to add RadRichTextEditorRuler and RadRichTextEditor to a form:

void RadRichTextEditorRuler_Load(object sender, EventArgs e)
{
    RadRichTextEditor radRichTextEditor1 = new RadRichTextEditor();
    radRichTextEditor1.LayoutMode = DocumentLayoutMode.Paged;
    RadRichTextEditorRuler documentRuler1 = new Telerik.WinControls.UI.RadRichTextEditorRuler();
    documentRuler1.AssociatedRichTextBox = radRichTextEditor1;
    documentRuler1.Dock = System.Windows.Forms.DockStyle.Fill;
    documentRuler1.Controls.Add(radRichTextEditor1);
    this.Controls.Add(documentRuler1);
}