Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic DiagramLink between two TreeviewItem (Read 1577 times)
Fred
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 4
Joined: May 8th, 2013
DiagramLink between two TreeviewItem
May 8th, 2013 at 12:35pm
Print Post  
Hello,

I have two TreeviewNode objects (node1 and node2) each having several TreeviewItem elements

I would like to "draw" a DiagramLink between a TreeviewItem of node 1 and a TreeviewItem of node2.

The TreeviewNodes show up correctly with the added TreeviewItems, but the DiagramLink is not visible.

Here is my code



        node1.AllowIncomingLinks = True
        node1.AllowOutgoingLinks = True
        node2.AllowIncomingLinks = True
        node2.AllowOutgoingLinks = True



        Dim lnk As New DiagramLink(MyDiagram)
        Dim conn1 As New TreeViewConnectionPoint(node1, lnk, False, ndeItem1)
        Dim conn2 As New TreeViewConnectionPoint(node2, lnk, True, ndeItem2)

      

        lnk.OriginConnection = conn2
        lnk.DestinationConnection = conn1
        ndeItem1.OutgoingLinks.Add(lnk)
        ndeItem2.IncomingLinks.Add(lnk)


Could someone please provide me a code sample to draw a DiagramLink between two TreeviewItem elements.

Thank you in advance

Fred
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: DiagramLink between two TreeviewItem
Reply #1 - May 8th, 2013 at 1:00pm
Print Post  
Hi,

Add the link to diagram.Links instead to nodes' collections, as in http://mindfusion.eu/Forum/YaBB.pl?num=1252378544/1#1. The nodes in/out collections will get updated automatically.

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


I Love MindFusion!

Posts: 4
Joined: May 8th, 2013
Re: DiagramLink between two TreeviewItem
Reply #2 - May 8th, 2013 at 3:10pm
Print Post  
Yes, that solved my problem.

Thank you
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint