Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Large margins inside container after layout (Read 1856 times)
Michael K
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 2
Joined: Dec 16th, 2014
Large margins inside container after layout
Dec 16th, 2014 at 7:34am
Print Post  
Hi,

I am just getting started with the Diagramming components. I have a set of nested diagrams, using the Decision layout. I build the layout recursively, innermost child first, then layout the parent etc.

I find that there is a large margin in the container nodes - how can I reduce this? I have tried setting the layout.Margin = new SizeF(0, 0).

See attached picture.

Here is how I layout each container, once the nodes and links have been added: (items contains the nodes and links for the container)

Code (C++)
Select All
DecisionLayout layout = new DecisionLayout();
layout.Margins = new SizeF(0, 0);
layout.StartNode = firstNode;
layout.Arrange(testCaseDiagram, items); 


  

largemargin.png (Attachment deleted)
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Large margins inside container after layout
Reply #1 - Dec 16th, 2014 at 9:10am
Print Post  
Hi,

Try setting container's AutoShrink property and calling its UpdateBounds method after arranging the container's children. That should wrap the container around its children.

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


I Love MindFusion!

Posts: 2
Joined: Dec 16th, 2014
Re: Large margins inside container after layout
Reply #2 - Dec 16th, 2014 at 9:13pm
Print Post  
great, thank you, adding .AutoShrink = true solved the issue.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint