Hello everybody,
I'm completely new to this FlowChart component. I'm currently evaluating if it is suitable for our new program.
As the table layout is not flexible enough for what we want to do, I choose to take a ContainerNode and place the shapes in there myself.
The Code I use is:
ContainerNode con = new ContainerNode(dgCableHarness);
con.Bounds = new RectangleF(10, 10, 50, 50);
DiagramNode node;
node = new ShapeNode(dgCableHarness);
node.Bounds = new RectangleF(0, 1f, 2, 2);
con.Add(node);
node = new ShapeNode(dgCableHarness);
node.Bounds = new RectangleF(0, 3f, 2, 2);
con.Add(node);
node = new ShapeNode(dgCableHarness);
node.Bounds = new RectangleF(0, 5f, 2, 2);
con.Add(node);
con.ZBottom();
con.SubordinateGroup.Visible = true;
diagram.Nodes.Add(con);
I've got a few question on that:
1. How can I define the position of the ShapeNodes inside the Container? Because if I set the X coordinate to 0 they don't appear on the left edge of the diagram, but a little bit in the middle? And is there any possibility to get them aligned in any way?
What I want to have is something that has inputs and outputs (where i = input/o = output). And I want to connect those inputs/outputs to other Containers having inputs and outputs.
+-------+ +-------+
| Item1 | | Item2 |
|-------| |-------|
| i1 o1 | +-|-i1 o1 |
| i2 o2 | | | i2 o2 |
| i3 o3-|-+ | i3 o3 |
+-------+ +-------+
I tried that with one userdrawn shape and anchor points, but then I can't use all the logic behind Nodes and Links.
2. Why do my ShapeNodes disappear if the Container is not selected? If I select the container I see all nodes, if I deselect the Container the Nodes inside the Container disappear.
(View Behaviour is MindFusion.Diagramming.Behavior.LinkShapes)
The User is not allowed to draw Shapes/Containers himself. All DiagramItems are generated in the Code (will be Drag and Drop from something like a toolbox later). The User can only draw Links between Nodes.
I hope someone can point me in the right direction, because I didn't find an example fitting my needs.
Thanks for your help!!!
Greetings,
FanderlF