.Alignment has no effect to the vertical alignment

Hi,

I use different GoText elements in my godiagramm 3.0.3.2 control. I can set the text alignment to middleleft, middleright or middlecenter but only the the horizontal alginment of the text changes (left, right, center) and the vertical alignment is always top.
I need to set the text alignment to middleleft!
Thanx for any help
Cheers
michael

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.

GoText, however, does define the "Location" property of the GoText bounding box to be the exact spot you specify.
Hi,
thank you for your answer. If I got it right it is not possible to place the text in the middle left of the gotext bounding textbox. The problem is that we place gotextboxes on specific positions on the diagramm as placeholders on a template. The textboxes have a specific size and the text is loaded dynamicly to the boxes and should appear in the middle of the textbox...
Cheers,
Michael

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?