Hello ,
InitializeComponent();
layout.Document = goView1.Document;
goView1.Dock = DockStyle.Fill;
goView1.DocPosition = new PointF(0F, 0F);
GoShape s = new GoDiamond();
GoShape s1 = new GoRoundedRectangle();
GoShape s2 = new GoRectangle();
GoTextNode x = new GoTextNode();
x.Background = s;
GoTextNode x1 = new GoTextNode();
x1.Background = s1;
GoTextNode x2 = new GoTextNode();
x2.Background = s2;
GoSubGraph sub = new GoSubGraph();
sub.BorderPen = new Pen(Brushes.Black);
sub.Label.Wrapping = true;
sub.Label.WrappingWidth = 70;
sub.Text = “111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111”;
goView1.Document.Add(x);
goView1.Document.Add(x1);
goView1.Document.Add(x2);
goView1.Document.Add(sub);
GoLink l = new GoLink();
GoLink l1 = new GoLink();
GoLink l2 = new GoLink();
GoLink l3 = new GoLink();
l.FromPort = x.BottomPort;
l.ToPort = x2.TopPort;
goView1.Document.LinksLayer.Add(l);
l1.FromPort = x.RightPort;
l1.ToPort = x1.TopPort;
goView1.Document.LinksLayer.Add(l1);
l2.FromPort = x1.BottomPort;
l2.ToPort = x2.TopPort;
goView1.Document.LinksLayer.Add(l2);
layout.DirectionOption = GoLayoutDirection.Down;
layout.PerformLayout();
}
private void button1_Click(object sender, EventArgs e)
{
layout.Network = null;
layout.PerformLayout();
}
}
}[/code]