Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Automatically layout of the nodes in a ContainerNode (Read 3527 times)
mandz
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 28
Joined: Mar 12th, 2013
Automatically layout of the nodes in a ContainerNode
Apr 17th, 2013 at 4:02am
Print Post  
Hi have a diagram with many nodes.  One of the nodes is a container node with child nodes.  I am able to add nodes and links to the container, but am unable to automatically arrange them.  This is may layout code:

Code
Select All
var layout = new LayeredLayout();
            layout.NodeDistance = 60;
            layout.Orientation = MindFusion.Diagramming.Layout.Orientation.Horizontal;
            layout.Arrange(diagram);
            diagram.ResizeToFitItems(5); 

  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Automatically layout of the nodes in a ContainerNode
Reply #1 - Apr 17th, 2013 at 7:02am
Print Post  
Hi,

Layout classes do not rearrange the content of containers by default. You can still arrange container's children by calling the Arrange(DiagramItemCollection) overload. Try the code from http://mindfusion.eu/Forum/YaBB.pl?board=fcnet_disc;action=display;num=127351559....

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
mandz
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 28
Joined: Mar 12th, 2013
Re: Automatically layout of the nodes in a ContainerNode
Reply #2 - Apr 17th, 2013 at 11:53pm
Print Post  
Thanks Stoyan.  Works for me
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint