Hi,
Windows only supports left, middle and right for editing and drawing, so we only use the left/middle/right -ness of the Alignment for those operations.
What GoTextNode and GoBasicNode (and others?) do, when AutoResizes is false, is to have their LayoutChildren methods position the GoText label object in the desired place given its size and given the size of the shape that surrounds it.
Hi, I had the same problem with vertical alignment of my GoText. I added a bit of code that utilized the .NET LineAlignment feature to change the vertical position. <?:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />
I added to this method in GoText.
private StringFormat getStringFormat(GoView view) {...}
and added this bit of code to set the LineAlignment:
switch (this.Alignment)
{
default:
case TopLeft:
case MiddleTop:
case TopRight:
myStringFormat.LineAlignment = StringAlignment.Near;
break;
case MiddleLeft:
case Middle:
case MiddleRight:
myStringFormat.LineAlignment = StringAlignment.Center;
break;
case BottomLeft:
case MiddleBottom:
case BottomRight:
myStringFormat.LineAlignment = StringAlignment.Far;
break;
}
Would it be possible to get this changed in the next release of GoDiagram? Alternatively, could we make this method virtual?