Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic GridLayout multiple rows (Read 1513 times)
jmquinlan
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 67
Joined: Apr 2nd, 2009
GridLayout multiple rows
Apr 29th, 2009 at 10:22am
Print Post  
Hello,

I'm using a grid layout to layout the nodes inside a container node. The setup is something like below:


1 container node contains
{
8 container nodes that each contain
{
3 to 4 table nodes interlinked
}
}

when i layout the contents of the primary container node using the grid layout, the layout places all container nodes horizontally from left to right in the same row.

it does not create multiple container rows of nodes eg.

this is what i get,

containernode
{
[container] [container] [container] [container]
}

instead of what i want.

containernode
{
[container] [container]
[container] [container]
}

how can I make the layout use multiple rows? below is my layout configuration:

Code
Select All
    private void LayoutDiagram()
    {
            this.Cursor = Cursors.WaitCursor;
            GridLayout newLayout = new GridLayout();
            newLayout.Anchoring = Anchoring.Keep;
            newLayout.RandomSeed = 5;
            newLayout.Iterations = 15;
            newLayout.GridSize = 15;

            DiagramItemCollection diagramItems = new DiagramItemCollection();

            if (m_diagram.Selection.Nodes.Count > 0)
            {
                newLayout.StartNode = m_diagram.Selection.Nodes[0];
                diagramItems = m_diagram.Selection.Items;

                foreach (DiagramItem item in diagramItems)
                {
                    if (item.GetType() == typeof(ProcessNode))
                    {
                        ArrangeSubItems(newLayout, item as ContainerNode);
                    }
                }
            }
            m_diagram.ResizeToFitItems(20);
            this.Cursor = Cursors.Default;
    }
 



Maybe I've missed some diagram initialisation to prevent it resizing the diagram or somethins.

anyways any suggestions would be usefull cheers guys.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: GridLayout multiple rows
Reply #1 - Apr 29th, 2009 at 1:48pm
Print Post  
If there are no links between the containers, it might process them as four separate graphs. Try setting GridLayout.SplitGraph = false, or GridLayout.MultipleGraphsPlacement = MinArea.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
jmquinlan
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 67
Joined: Apr 2nd, 2009
Re: GridLayout multiple rows
Reply #2 - May 18th, 2009 at 4:37pm
Print Post  
yes that helped alot the layout is working really well now
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint