Boxnode port not drawn around entire body object


I have a boxnode that has, as its body, a gonode that includes an image (goimage) centered above a golistgroup, which contains gotext and other goobjects. The boxnode port is not being drawn around the entire gonode, as I would expect. Visually, it appears that the boxnode port is only being drawn around the golistgroup portion of the goNode, but not drawn around the goimage. Why is this? What must I do to draw the port around the entire body object?

Also, when the boxnode is dragged the port separates from the body (gonode). When I finish dragging the boxnode, the boxnode port is one place on the screen, the boxnode body (gonode) is another place on the screen. How do I keep the boxnode port and the boxnode body (gonode) together before, during, and after dragging.

Thanks a lot.

R. Houston

It's a bit unusual to have a node with ports inside a node with ports, but that's OK.
Given the code:
[code] GoMultiTextNode mtn = new GoMultiTextNode();
mtn.Selectable = false;
mtn.Brush = Brushes.White;
for (int i = 0; i < mtn.ItemCount; i++) {
GoPort p = mtn.GetRightPort(i) as GoPort;
if (p != null) p.Style = GoPortStyle.Ellipse;
p = mtn.GetLeftPort(i) as GoPort;
if (p != null) p.Style = GoPortStyle.Triangle;
GoBoxNode bn = new GoBoxNode();
bn.Body = mtn;
I get the following display (on a light-yellow background):
That node (a GoBoxNode containing a GoMultiTextNode) moves and copies well, as one would expect.

Hi Walter,

I found my problem…

For what its worth…
The overridden LayoutChildren method called SetSpotLocation for positioning the listgroup inside the GoNode. The 2nd argument to SetSpotLocation should have been Me.Body rather than Me. Replacing Me with Me.Body made the bizarre behavior go away.

Thanks again for your time.

R. Houston