Change size of a Text Node

Hellol All,

I am using Go for Forms and I am trying to change the size of a TExt Node.
I have the following code which should be working OK but it does not change the size of the Text Node.
Here is my code
GoTextNode bn = new GoTextNode();
GoRoundedRectangle roundrectangle = new GoRoundedRectangle();
Pen p = new Pen(Color.Black); SizeF size = new SizeF(); bn.Pen = p; bn.Text = "Test"; bn.Label.Editable = true; bn.Location = loc; size.Height = 22.7F; size.Width = 59.9F; bn.Size = size; //Here is how I assign the size roundrectangle.Pen = Pens.Black; roundrectangle.Brush = Brushes.Aqua; bn.Background = roundrectangle; bn.ToolTipText = "Sample Text Node"; bn.AutoResizes = false; goView1.Document.Add(bn);
Any suggestions?
Thanks in advance!

I think you need to set AutoResizes to false before you set the Size:

[code] GoTextNode bn = new GoTextNode(); bn.Background = new GoRoundedRectangle(); bn.Brush = Brushes.Aqua; bn.Text = "Test"; bn.Label.Editable = true; bn.ToolTipText = "Sample Text Node"; bn.AutoResizes = false; bn.Size = new SizeF(59.9F, 22.7F); bn.Location = loc; goView1.Document.Add(bn);[/code]
Setting the Size beforehand has no effect because LayoutChildren makes sure the Background just fits around the Label (plus margins) when AutoResizes is true, as it is by default.
Thanks for the reply,
I did that
GoTextNode MakeTextNodeOval(PointF loc)
bn.AutoResizes = false; bn.Location = loc; bn.Size = new SizeF(59.9F, 22.7F); }
but now the text box appears always small and at the upper left coorner of the view disregarding size and location parameters.

OK I figured out why,

you need to speciffy the background shape before you call the size

bn.Background = roundrectangle;
bn.Label.Editable = true;
bn.Location = loc;
bn.AutoResizes = false;
bn.Size = new SizeF(100.9F, 100.7F);

Thanks for the help