Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic DiagramLink between a tablecell and table (Read 1595 times)
murat2912
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 5
Joined: Nov 3rd, 2008
DiagramLink between a tablecell and table
Nov 3rd, 2008 at 3:11pm
Print Post  
Hi everybody...
I want to draw link between a table cell and another table with code.how can i do that?
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: DiagramLink between a tablecell and table
Reply #1 - Nov 3rd, 2008 at 3:19pm
Print Post  
Hi,

Try this:

Code
Select All
TableNode t1 = diagram.Factory.CreateTableNode(10, 10, 20, 40);
TableNode t2 = diagram.Factory.CreateTableNode(110, 10, 20, 40);
DiagramLink l = diagram.Factory.CreateDiagramLink(t1, 1, t2, -1);
l.Dynamic = true;
 



-1 designates that the link should not be associated with a row. Dynamic = true lets you verify that indeed the link's origin is connected to a row, and the destination isn't: grab t2 and drag it around t1, and you will notice how the link stays at the second row at t1, while it connects to any point of the t2's outline.

Links are associated with table rows and not with cells, but you could add an anchor point whose Column property is set; this would make the point relative to the cell's bounds.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
murat2912
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 5
Joined: Nov 3rd, 2008
Re: DiagramLink between a tablecell and table
Reply #2 - Nov 3rd, 2008 at 3:59pm
Print Post  
You are perfect.Thanks.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint