Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic how to place node into form (Read 1262 times)
chuckdawit
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 20
Joined: Sep 4th, 2009
how to place node into form
Sep 8th, 2009 at 8:17pm
Print Post  
I have this code below but I don't know how to create the 'diagram' in a form to display it. Can anyone help?
TableNode t = diagram.Factory.CreateTableNode(0, 0, 50, 30);
t.RedimTable(1, 1);
t.Style = TableStyle.RoundedRectangle;
t.Brush = new SolidBrush(Color.White);
t.CellFrameStyle = CellFrameStyle.None;
t.Caption = "S1";
t[0, 0].Text = "Pairs Model 1212";

ShapeNode a = diagram.Factory.CreateShapeNode(5, 30, 15, 15, Shapes.OffpageReference);
a.Brush = t.Brush;
a.AttachTo(t, AttachToNode.BottomLeft);
a.Text = "A";
a.Locked = true;

ShapeNode b = diagram.Factory.CreateShapeNode(30, 30, 15, 15, Shapes.OffpageReference);
b.Brush = t.Brush;
b.AttachTo(t, AttachToNode.BottomRight);
b.Text = "B";
b.Locked = true;
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: how to place node into form
Reply #1 - Sep 9th, 2009 at 5:51am
Print Post  
You must add a DiagramView to display the Diagram instance. This is shown here.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint