TextAlignmentHorizontal: GxAlignment;
The TextAlignmentHorizontal property determines horizontal text alignment.
Executing the example requires an existing ws object of the IWxWorkspace type.
Sub UserProc;
Var
ws: IWxWorkspace;
Shape: IWxShape;
Style: IWxStyle;
Begin
ws.BeginUpdate;
Shape := ws.Shapes.Item(1);
Shape.Text := "Text";
Style := Shape.Style;
Style.TextFontSize := 12;
Style.TextFontBrushColor := GxColor.FromName("Red");
Style.TextAlignmentHorizontal := GxAlignment.Far;
ws.EndUpdate;
End Sub UserProc;
After executing the example an object contains text of the defined color and size, which is aligned right.
See also: