Remarks
The property's default value is Horizontal
The property returns its default value when the text selection contains multiple paragraphs with mixed alignment. The Selection.
Gets or sets the horizontal text alignment.
public HorizontalAlignment Alignment { get; set; }
Public Property Alignment() As HorizontalAlignment
Member | Description |
---|---|
Left | Text is left aligned. |
Right | Text is right aligned. |
Center | Text is centered. |
Justify | Text is justified. |
The following example uses the Alignment property to set the horizontal text alignment to value: Center.
TXTextControl.ParagraphFormat format = new TXTextControl.ParagraphFormat();
format.Alignment = TXTextControl.HorizontalAlignment.Center;
format.Frame = TXTextControl.Frame.Box;
format.FrameStyle = TXTextControl.FrameStyle.Double;
textControl1.Selection.ParagraphFormat = format;
Dim format As TXTextControl.ParagraphFormat = New TXTextControl.ParagraphFormat()
format.Alignment = TXTextControl.HorizontalAlignment.Center
format.Frame = TXTextControl.Frame.Box
format.FrameStyle = TXTextControl.FrameStyle.Double
TextControl1.Selection.ParagraphFormat = format
The property's default value is Horizontal
The property returns its default value when the text selection contains multiple paragraphs with mixed alignment. The Selection.