Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Derived TableNode classes and improperly drawn diagramLinks (Read 2884 times)
Alex Nicoll
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 3
Joined: Jul 26th, 2016
Derived TableNode classes and improperly drawn diagramLinks
Jul 26th, 2016 at 1:18pm
Print Post  
I use a custom class that inherits from the TableNode class, called the ExtendedTableNode class.  Before adding this new class to a diagram, I made sure to change the diagram link handling for TableNodes to link to tables, not rows. 

When I draw my diagram, I add multiple ExtendedTableNodes, and then call the Diagram.Factory.CreateDiagramLink() function to create links between them.  If I do not cast the ExtendedTableNode to TableNode in the function call, the links are created between the top rows in the tables.  If I do cast the ExtendedTableNode to TableNode, the links are drawn between the tables, as desired.   So far so good.

However, when adding a link manually between two ExtendedTableNodes by using a mouse when the application runs, the link connects the top rows in the tables, rather than the tables.  The question is, is there a way to make the   diagram links connect the tables, rather than the rows?  I cannot find a function to override to provide proper casting, or I would do that.

Any ideas?
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3146
Joined: Oct 19th, 2005
Re: Derived TableNode classes and improperly drawn diagramLinks
Reply #1 - Jul 26th, 2016 at 1:30pm
Print Post  
Hi,

Set the ConnectionStyle property of tables to TableConnectionStyle.Table and the link shouldn't let you connect individual rows.

Regards,
Slavcho
Mindfusion
  
Back to top
 
IP Logged
 
Alex Nicoll
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 3
Joined: Jul 26th, 2016
Re: Derived TableNode classes and improperly drawn diagramLinks
Reply #2 - Jul 26th, 2016 at 6:40pm
Print Post  
Slavcho -

Thank you very much for the reply.  Unfortunately, that was the first thing I did, and I am still seeing the behavior.

-Alex
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3146
Joined: Oct 19th, 2005
Re: Derived TableNode classes and improperly drawn diagramLinks
Reply #3 - Jul 26th, 2016 at 6:44pm
Print Post  
Have you set Diagram.TableConnectionStyle or TableNode.ConnectionStyle? The former is automatically assigned to the latter only for nodes created using the TableNode(Diagram) constructor.

Regards,
Slavcho
Mindfusion
  
Back to top
 
IP Logged
 
Alex Nicoll
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 3
Joined: Jul 26th, 2016
Re: Derived TableNode classes and improperly drawn diagramLinks
Reply #4 - Jul 27th, 2016 at 6:51pm
Print Post  
Slavcho -

Good point, I missed that one.  I changed the ConnectionStyle for the TableNode derivative class in the constructor, and that seems to have fixed the issue.

Thanks!

-Alex
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint