Can Anyone Please help me ?
i am a new user to GO Diaramming and i want to create links connected to nodes.
A sample example that can help me.
Thanks a lot in advance.
vineet
Can Anyone Please help me ?
From MinimalApp.cs:
[code] // create two nodes for fun…
GoBasicNode node1 = new GoBasicNode();
// specify position, label and color
node1.Location = new PointF(100, 100);
node1.Text = “first”;
node1.Editable = true; // first node is editable with F2 only
node1.Brush = Brushes.Blue;
// add to the document, not to the view
myView.Document.Add(node1);
GoBasicNode node2 = new GoBasicNode();
node2.Location = new PointF(200, 100);
node2.Text = "second";
node2.Label.Editable = true; // second node is editable by clicking only
node2.Brush = Brushes.Magenta;
myView.Document.Add(node2);[/code]
You can then add:
GoLink link = new GoLink();
link.ToArrow = true;
link.FromPort = node1.Port;
link.ToPort = node2.Port;
myView.Document.Add(link);
thanks a lot walter.
I don’t understand your question. You can just create a link from C to A if you want.