We have a requirement that a node may be held within another node (theoretically, infinately one inside the other).
I have implemented a custom class that inherits from a GoNode to acomplish this. When needed, it creates another instance of a node, and sets up a spot location of
SetSpotLocation(MiddleBottom, Me.Border, MiddleBottom)
My problem is that when the main node is moved, the “sub” node does not move with it. I have tried overriding the MoveChildren method to move them manually, with no success.
How can i achieve the required functionality. I can supply a sample if that helps.
p.s. Is this the official place to go for support?
No, actually, this is not an official place to get support. It turns out that I already answered you by e-mail. Now that I have nothing else to do (?!?!) I see if there’s anything in this forum that deserves my attention.
My question to you was whether you added those “contained” or “nested” nodes to the “container” or “parent” node by calling GoGroup.Add? If so, then GoGroup.MoveChildren would automatically behave the way you would expect when the parent node is moved.
Actually, I should add that you probably want to make those child nodes not Selectable. If you really do want them to be separately selectable by the user, then you can set Selectable to true and DragsNode to true too, so that the user’s trying to drag the child node will cause the whole container node to move. A number of example nodes do this.