Skip to main content
A newer version of this page is available. .

Editor Elements

  • 3 minutes to read

The RichEditControl control consists of visual elements that provide end-users with capability of editing and viewing documents.

RTEElementsOverView

Document Views

The main area of RichEditControl is the Text Editing Surface that displays a document to be edited. Here, a document can look as it will appear when it is printed (PrintLayoutView), or with reduced formatting and pagination (SimpleView or DraftView). To get access to settings of the document views, use the RichEditControl.Views property. The currently selected view is accessible via the RichEditControl.ActiveView property. To select another view, use the RichEditControl.ActiveViewType property, or call the SwitchToSimpleViewCommand, SwitchToDraftViewCommand or SwitchToPrintLayoutViewCommand command.

Note

The RichEditView.AdjustColorsToSkins property of a current view allows you to adapt the RichEditControl’s font color and background color values from the current skin if they are not displayed correctly. Set the AdjustColorsToSkins property to true in the RichEditControl.Load event handler to complete the task.

To provide end-users with the capability to switch document views depending on their tasks, you can accompany RichTextControl with the Document Views toolbar or Ribbon page group. To get an example on how to provide Bars or Ribbon UI for a RichTextControl, see How to: Create a Simple Word Processor with a Bar UI or How to: Create a Simple Word Processor with a Ribbon UI.

Rulers

On the top and the left of the Text Editing Surface, RichEditControl displays horizontal and vertical rulers, which end-users can use to change table column width and row height, align text, graphics, and other elements in a document.

The horizontal ruler controls the width of table columns and the horizontal spacing of paragraph margins and tabs.

RTETabsAlignment

The vertical ruler allows you to set the top and bottom margins of the document, and change height of table rows.

RTEVerticalAlignment

By default, visibility of horizontal and vertical rulers depends on the currently selected document view: in the Simple view rulers are hidden, in the Draft view the horizontal ruler is only available, in the Print Layout view both horizontal and vertical rulers are shown.

However, you can hide or display rulers independently of the document views by using the RichEditControl.Options property. It provides access to various characteristics of the control, among them RichEditControlOptionsBase.HorizontalRuler and RichEditControlOptionsBase.VerticalRuler.

To enable and-users to change the visibility of rulers, you can provide the Show toolbar or Ribbon page group for the RichEditControl.

Scrollbars

By default, the document view can display horizontal and vertical scrollbars when needed, i.e. if a page does not fit into the control’s display area.

However, you can control the visibility of scrollbars via the RichEditControl.Options property. It provides access to various characteristics of the control, among them RichEditControlOptions.HorizontalScrollbar and RichEditControlOptions.VerticalScrollbar.

See Also