Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Diagram Links (Read 1706 times)
zoozoo
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 20
Joined: Jun 24th, 2009
Diagram Links
Jun 26th, 2009 at 10:28am
Print Post  
how can I remove all the links attached to any particular node of a diagram with treelayout ??

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Diagram Links
Reply #1 - Jun 26th, 2009 at 11:45am
Print Post  
You can't remove links while enumerating the collection, so add the links to a new collection and enumerate it to remove them:

Code
Select All
DiagramLinkCollection links = new DiagramLinkCollection();
foreach (DiagramLink l in node.IncomingLinks)
	links.Add(l);
foreach (DiagramLink l in node.OutgoingLinks)
	links.Add(l);
foreach (DiagramLink l in links)
	diagram.Links.Remove(l);
 



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


I love YaBB 1G - SP1!

Posts: 20
Joined: Jun 24th, 2009
Re: Diagram Links
Reply #2 - Jun 26th, 2009 at 12:36pm
Print Post  
wow this is nice !
thanks a lot !
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint