[Expand]General Information
[Collapse]WinForms Controls
  Prerequisites
 [Expand]What's Installed
 [Expand]Build an Application
 [Collapse]Controls and Libraries
  [Expand]Forms and User Controls
  [Expand]Messages, Notifications, and Dialogs
  [Expand]Editors and Simple Controls
  [Expand]Ribbon, Bars and Menu
  [Expand]Application UI Manager
  [Expand]Docking Library
  [Expand]Data Grid
  [Expand]Vertical Grid
  [Expand]Property Grid
  [Expand]Pivot Grid
  [Expand]Tree List
  [Expand]Chart Control
  [Expand]Diagrams
  [Expand]Gauges
  [Expand]Map Control
  [Expand]Scheduler
  [Expand]Spreadsheet
  [Collapse]Rich Text Editor
   [Expand]Product Information
    Product Class Structure
    Supported Formats
   [Expand]Getting Started
   [Expand]RichEditControl Document
   [Expand]Fields
    Text Formatting
    Import and Export
   [Expand]Page Layout
    Printing
    Spell Checking
    AutoCorrect Feature
    Mail Merge
    Restrictions and Protection
   [Collapse]Visual Elements
     Command UI
     Views
     Rulers
     Reviewing Pane
     Pop-up Menus
    [Expand]Dialogs
     End User Restrictions
    Services
    Events
    Commands
    Keyboard Shortcuts
    HTML Tag Support
   [Expand]Examples
  [Expand]Spell Checker
  [Expand]Form Layout Managers
  [Expand]Navigation Controls
  [Expand]Printing-Exporting
  [Expand]PDF Viewer
   Reporting
  [Expand]Snap
  [Expand]TreeMap Control
  [Expand]Sunburst Control
 [Expand]Common Features
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Reporting
[Expand]Report and Dashboard Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]eXpress Persistent Objects
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation
View this topic on docs.devexpress.com (Learn more)

Rulers

RichEditControl displays horizontal and vertical rulers. The horizontal ruler controls the table columns' width and the horizontal spacing of paragraph margins and tabs. The vertical ruler allows you to set the top and bottom margins of the document, and change the table rows' height.

Horizontal and vertical rulers' visibility depends on the selected document view. End users can control the rulers' visibility using the Show toolbar or Ribbon page group.

You can specify whether to hide or display rulers using the RulerOptions.Visibility property, as shown below:

The table below lists actions you can perform with horizontal and vertical rulers.

Functionality

Action

API

Adjust Page Margins (available only in the Page Layout view)

Position the cursor on the ruler at the current margin so it transforms into the double-headed horizontal or vertical arrow. Drag it to increase or decrease the margin.

SectionMargins.Left

SectionMargins.Right

SectionMargins.Top

SectionMargins.Bottom

Use notation:

richEditControl1.Document.Sections[0].Margins.Left,

richEditControl1.Document.Sections[0].Margins.Right,

richEditControl1.Document.Sections[0].Margins.Top,

richEditControl1.Document.Sections[0].Margins.Bottom

Adjust Paragraph Margins

Drag the First Line Indent, Left Indent or the Right Indent markers.

The Paragraph.FirstLineIndent, Paragraph.LeftIndent or the Paragraph.RightIndent properties.

Set Tabs

Click the Tab Alignment Selector to toggle the tab alignment to the desired type. After that, click within the ruler to set the tab stop.

The TabInfo.Alignment and TabInfo.Position properties.

Adjust Column Width

Position the cursor on the ruler at the text boundaries, so that it transforms into the double-headed horizontal arrow. Drag it to adjust the column width.

The SectionColumn.Width and SectionColumn.Spacing properties.

Adjust Table Column Width

When the caret is in the table, position the cursor on the ruler at the column boundaries, so that it transforms into the double-headed horizontal arrow. Drag it to adjust the column width.

How to: Create a Table with Fixed Column Width

Adjust Table Row Height

Position the cursor on the ruler at the text boundaries, so that it transforms into the double-headed vertical arrow. Drag it to adjust the row height.

TableRow.Height

Rulers show the DocumentUnit.Document (1/300 of an inch) measurement units. Specify the the RichEditControl.Unit property to change the rulers' measurements. When a document is loaded in the RichEditControl, you can set the measurement unit with the Document.Unit property. The document setting is in effect until another document is loaded or a new document is created.

Is this topic helpful?​​​​​​​