Invisible objects layout issue


Thanks for the previous answers. Now I have a new issue. I want to hide some objects based on specific conditions. I do this by set objects’ Visible to false. Then I call GoView’s PerformLayout(). It seems that the invisible objects do not change the layout.
Should I dynamically add/remove the objects or override PerformLayout(the last thing I’d like to do)? Are there any better ways to do?


Ahh, I had a similar issue.

Perform layout is on the layout portion of Go, and is a mehtod of GoLayout (I think). Perform Layout operates on the underlying “network” of nodes that you set in GoLayout.Network. When GoLayout.Network == null then it uses all the nodes in the document, to stop the layout algo using these you need to do somehthing like:
GoLayout.Network = new GoLayoutNetwork(Collection of All Visible nodes in Document);
If this is done correctly then, the PerformLayout works only on the nodes you specify in the Network.
I hope this helps.