Adding GoText labels to Iconic Node

I’m tryng to position a couple of additional GoText object to the right of my icon on a variation of the GoIconicNode. As shown in the rough sketch below!

XXXX GoText1
XXXX GoText2
I am adding these in the DocumentChanged event on the parent goDocument object. but when I position these explicitly the OnChildBoundsChanged event than repositions the labels. Is there a way of repositionsing these so that the LayoutChildren will not relocate them or a means of using the LayoutChildren procedure to positions these better. I do not quite understand how this handles GoText objects added to the node?

GoIconicNode.LayoutChildren does not know about any GoObjects that you add as extra children of the node, so it does not position or size them in any way.

You might want to override LayoutChildren so that it calls the base method and then positions your extra labels the way you want.

But you don’t even have to do that if you don’t expect the Icon to change size.

This worked for me (with just one extra label):

GoIconicNode in2 = new GoIconicNode(); in2.Initialize(null, "doc.gif", "a node"); in2.Icon.Size = new SizeF(32, 32); GoText lab1 = new GoText(); lab1.Selectable = false; lab1.Text = "label 1"; lab1.SetSpotLocation(GoObject.MiddleLeft, in2.Icon, GoObject.MiddleRight); in2.Add(lab1); in2.Position = new PointF(300, 400); goView1.Document.Add(in2);

Many thanks

using SetSpotLocation did the job for me, I think I was getting my possitionging wrong in the first place, but using this is a lot easier!