RulerBar Class
- Namespace
TXTextControl
- Package
TXTextControl.from the private NuGet feed or Text Control Offline PackagesTextControl. WinForms. SDK
- Assembly
TXTextControl.Windows. Forms. dll
- Install
dotnet add package TXTextControl..NET 8 and later. For .NET Framework, referenceTextControl. WinForms. SDK TXTextControl.from the setup.Windows. Forms. dll
- Inherits
- Control
- Ruler
Bar
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 : ControlPublic Class RulerBar
Inherits ControlExamples
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;Dim rulerBar As New RulerBar()
rulerBar.Alignment = RulerBarAlignment.TopMembers
Constructors
| Constructor | Description |
|---|---|
| RulerBar | Not described in the reference. public RulerBar(); |
Properties
| Property | Description |
|---|---|
| Alignment | Gets 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. |
| BorderStyle | Gets or sets the border style of the ruler bar. |
| DisplayColors | Gets 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. |
| EnablePageMargins | Enables or disables the setting of page margins. If the property's value is true, the setting of page margins is enabled. |
| FormulaMode | Gets 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. |
| ReadOnly | Gets 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. |
| ScaleUnit | Gets or sets the unit of the ruler bar's scale. |
Methods
| Method | Description |
|---|---|
| ResetDisplayColors | Resets all display colors of a ruler bar to their system dependent default values. |