Silly alignment question


#1

I am trying to left align my text in a gotext object being added to my listgroup of the gomultitextnode, heres my code:
private void AddResource(String sResourceName)
{
GoText oText = new GoText();
oText.Selectable = true;
oText.DragsNode = false;
oText.Text = sResourceName;
oText.Alignment = GoObject.TopLeft;
ListGroup.Add(oText);
}
Any idea’s as to why my text would still be center aligned as opposed to left aligned?
Thanks,
Ryan


#2

You are setting the alignment of the text as drawn within the bounds of the text.
Instead I think you want to set the alignment of the (text) objects within the GoListGroup. You can do that by setting GoListGroup.Alignment.


#3

Thanks!