Using a ruler in RichText editor for FastReport .NET

2022-03-16

RichText

A ruler has been added to the RichText editor. It allows users to control tab width and set indents before the left and right margins.

To add a tab stop, you need to double-click the left mouse button on the horizontal ruler in the place where it is needed. An "arrow" will appear in the selected area, indicating the tab stop point. When holding the left mouse button on this "arrow", you can change its location by moving the mouse. At the same time, while pressing and moving the “arrow”, a guide will be displayed, which clearly shows the future location of the text after the tabulation.

An example of a given tab stop on a ruler:

Tab stop point on a ruler

If the tab is not needed, you can remove it with a right-click on it.

You can set indents by hovering over the end of the ruler corresponding to the indent. This will change the cursor from the main mode to the horizontal resizing mode. They can be changed just at the moment when you hold down the left button.

When changing the left indent, the initial position of the text will change, and the positions of the already set tab stops relative to this indent will also change. When changing the right indent, the text wrapping location will be set. It is worth noting that the position of the right indent will change relative to the right edge of the text field if its dimensions are changed.

An example of a rich text without indents:

Rich text without indents

Example of a rich text with left and right indent:

Rich text with left and right indent

It is also worth noting the formatting using a ruler with respect to the entire text and its parts. If the RichObject was empty at the beginning of editing, then the specified formatting will be applied to all text as it is written. This will happen until the cursor is moved to any line with the mouse or some part of the text is selected. In the case where the RichObject was not empty, the ruler at the beginning of editing will display the formatting of the first line.

If you want to apply formatting to a part of the text, then select the necessary part and then the formatting of the selected part will be displayed on the ruler. This part will be "clean" in 2 cases:

- if different formatting is applied to different parts of the text;
- if there is no formatting for this fragment.

When changing text with different formatting, the old formatting will be replaced by the new one. Selecting all text for formatting with a ruler is a special case, due to which the text selection will be removed immediately after any manipulation on the ruler. Additionally, the selection will disappear for all text that already exists or will be written, and the formatting that is currently set will be applied.

This change should make reporting easier by enhancing the RichText editor in the designer and reducing the need for a user to use third-party text editors when creating rich text.

August 12, 2024

How to build and install the Postgres plugin in FastReport .NET

This article describes how to connect to the database using the FastReport .NET plugin for the report designer from Visual Studio via the NuGet server.
August 08, 2024

How to install FastReport .NET and its components on Windows

Step-by-step instructions for online and manual installation via the FastReport registration code.NET and its components in Windows.
July 26, 2024

Updating HTMLObject as a plugin for FastReport .NET

Detailed instructions for using the new HTMLObject plugin, which uses splitting DOM HTML into FastReport report objects.
Fast Reports
  • 800-985-8986 (English, US)
  • +4930568373928 (German)
  • +55 19 98147-8148 (Portuguese)
  • info@fast-report.com
  • 901 N Pitt Str #325 Alexandria VA 22314

© 1998-2024 Fast Reports Inc.