System.Windows.Forms.TextBox.TextAlign Property

Gets or sets how text is aligned in a System.Windows.Forms.TextBox control.

Syntax

[System.ComponentModel.Localizable(true)]
[System.ComponentModel.DefaultValue(System.Windows.Forms.HorizontalAlignment.Left)]
public HorizontalAlignment TextAlign { set; get; }

Value

Documentation for this section has not yet been entered.

Remarks

You can use this property to align the text within a System.Windows.Forms.TextBox to match the layout of text on your form. For example, if your controls are all located on the right side of the form, you can set the Label.TextAlign property to HorizontalAlignment.Right, and the text will be aligned with the right side of the control instead of the default left alignment.

Requirements

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0