TextShape.HorizontalAlignment

From Xojo Documentation

Property (As Alignment )
aTextShape.HorizontalAlignment = newAlignmentValue
or
AlignmentValue = aTextShape.HorizontalAlignment

New in 2019r2

Supported for all project types and targets.

Sets the horizontal alignment of the TextShape.

Notes

The choices are: Left, Center, or Right. The default is Center. The alignment is relative to the Object2D.X property.

Example

This example aligns the TextShape to the left.

Var ts As New TextShape
ts.X = 20
ts.Value = "Hello World"
ts.HorizontalAlignment = TextShape.Alignment.Left