Edit this page


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.

richtexteditor-richtexteditorruler 001


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.

richtexteditor-richtexteditorruler 002

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;

Private Sub RadRichTextEditorRuler_Load(ByVal sender As Object, ByVal e As EventArgs)
    Dim radRichTextEditor1 As New RadRichTextEditor()
    radRichTextEditor1.LayoutMode = DocumentLayoutMode.Paged
    Dim documentRuler1 As RadRichTextEditorRuler = New Telerik.WinControls.UI.RadRichTextEditorRuler()
    documentRuler1.AssociatedRichTextBox = radRichTextEditor1
    documentRuler1.Dock = System.Windows.Forms.DockStyle.Fill
End Sub