System.Windows.Forms.MaskedTextBox.TextAlign Property

Gets or sets how text is aligned in a masked text box 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 the MaskedTextBox.TextAlign property to align the displayed text within a System.Windows.Forms.MaskedTextBox to match the layout of visual elements on your form. For example, if your controls are all located on the right side of the form, you can set the MaskedTextBox.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: 2.0.0.0