TX Text Control .NET for Windows Forms

TextAlign Property

Property|Introduced in 24.0
Namespace
TXTextControl.Windows.Forms.Ribbon
Package
TXTextControl.TextControl.WinForms.SDK as TXTextControl.Windows.Forms.dll from the private NuGet feed or Text Control Offline Packages

Description

Gets or sets how text is aligned in the text box. The default value is HorizontalAlignment.Left.

Syntax

public System.Windows.Forms.HorizontalAlignment TextAlign { get; set; }

Examples

The following example uses RibbonTextBox.TextAlign to configure text align as part of the ribbon text box workflow. The change is then applied to the active document or user interface.

ribbonTextBox.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
ribbonTextBox.Update();