GoText Alignment

Help me, please. Alignment doesn’t work…
What’s wrong here:
public class GoDiagramIndirectHoldingLabel : GoText
public GoDiagramIndirectHoldingLabel(GoDiagramNode node) : base()
this.Selectable = true;
this.Text = “bla-bla-bla”;
this.AutoResizes = false;
this.TransparentBackground = true;
this.Size = new SizeF(node.Size);
this.Position = new PointF(node.Position.X, node.Position.Y);
this.Alignment = BottomRight;
I tried different values for this line
this.Alignment = BottomRight;
horizontal alignment works, vertical alignment doesn’t… Text is always at the top.
I use GoDiagram for .NET.

This is a restriction carried over from System.Drawing and GDI+. System.Drawing.StringAlignment only specifies Near/Center/Far values along the horizontal axis, not the vertical axis.
It’s probably easiest to do this instead:
GoText t = new GoText();
t.Text = “bla-bla-bla”;
t.Alignment = GoObject.BottomRight;
t.SetSpotLocation(GoObject.BottomRight, node, GoObject.BottomRight);
If you expect the size of the node or of the GoText to change, you ought to override LayoutChildren on the node’s class to make sure the GoText is always positioned at the bottom right corner of the Icon or Background.