TX Text Control .NET for Windows Forms

RulerBar Class

Class
Namespace
TXTextControl
Package
TXTextControl.TextControl.WinForms.SDK from the private NuGet feed or Text Control Offline Packages
Assembly
TXTextControl.Windows.Forms.dll
Install
dotnet add package TXTextControl.TextControl.WinForms.SDK .NET 8 and later. For .NET Framework, reference TXTextControl.Windows.Forms.dll from the setup.
Inherits
  1. Control
  2. RulerBar

Description

The RulerBar class represents a Windows Forms tool bar which can be used to show or to set indents, margins and tabs of a Windows Forms TextControl. It is inherited from the System.Windows.Forms.Control class. The following describes only the properties, methods and events defined through the RulerBar class. For a list of properties, methods and events inherited from the System.Windows.Forms.Control class see the .NET Framework reference.

Syntax

public class RulerBar : Control

Examples

The following example creates a Ruler Bar instance and configures its alignment setting for a document workflow.

using RulerBar rulerBar = new();
rulerBar.Alignment = RulerBarAlignment.Top;

Members

Constructors

ConstructorDescription
RulerBarNot described in the reference. public RulerBar();

Properties

PropertyDescription
AlignmentGets or sets a value specifying the alignment of the ruler bar in the document. Depending on the alignment either a horizontal or a vertical ruler is displayed. This property is automatically set to Top, if the control's Dock property is set to to Top or Bottom. It is automatically set to Left, if the control's Dock property is set to to Left or Right.
BorderStyleGets or sets the border style of the ruler bar.
DisplayColorsGets or sets the colors of the ruler bar. These colors are only used when the BorderStyle property has been set to ColorScheme. The property value is an object of the type RulerBar.Colors.
EnablePageMarginsEnables or disables the setting of page margins. If the property's value is true, the setting of page margins is enabled.
FormulaModeGets or sets a value specifying whether the ruler bar shows cell references when the current input position is in a table cell. Depending on the TextControl.FormulaReferenceStyle property cell references are shown either in the A1 or in the R1C1 notation. This property has no effect when the BorderStyle property has been set to RulerBarBorderStyle.Simple3D or RulerBarBorderStyle.Fixed3D.
ReadOnlyGets or sets a value determining the ruler bar's read only mode. When the ruler bar is set to read only, it still shows all formatting attributes of the connected TextControl, but formatting attributes cannot be changed.
ScaleUnitGets or sets the unit of the ruler bar's scale.

Methods

MethodDescription
ResetDisplayColorsResets all display colors of a ruler bar to their system dependent default values.

Further Reading

  • Opening the Tab Dialog on Clicking a Tab Position in the RulerBar –