Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Expandable Custom CompositeNode (Read 2478 times)
Rich Cassell
Junior Member
**
Offline


I Love MindFusion!

Posts: 63
Joined: Sep 19th, 2012
Expandable Custom CompositeNode
Apr 30th, 2015 at 11:07am
Print Post  
Hey,

I have a custom node class which inherits CompositeNode and are used within a TreeLayout. As part of this, I now want the "expandable" facility adding so I set the Expandable property of all nodes to be True but the +/- icons did not appear. I've since set what I think are all of the other related properties of the Diagram object but they're still not showing.

I had a search on the forum and found a thread where you recommended overriding the "drawLocal" or "Draw" method in the custom class (I don't currently override either) and calling "DrawManipulators" from it. I've tried this and my nodes still aren't showing the +/- icons. I must be missing something very obvious. Any ideas?

Cheers,

Rich Smiley
  
Back to top
 
IP Logged
 
Rich Cassell
Junior Member
**
Offline


I Love MindFusion!

Posts: 63
Joined: Sep 19th, 2012
Re: Expandable Custom CompositeNode
Reply #1 - Apr 30th, 2015 at 1:50pm
Print Post  
Hey,

Just a quick extension of my last message...

It seems that for NEW diagrams the expandable property is there and I have the +/- buttons appearing - presumably this is due to the "NodesExpandable" boolean being set...

However,  I am still not getting them to appear on existing diagrams. I have tried to go through a loop of the diagram nodes and set their "expandable" parameter individually, which sets it properly, but isn't showing the +/-??

Cheers,

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Expandable Custom CompositeNode
Reply #2 - Apr 30th, 2015 at 4:33pm
Print Post  
Hi,

Adding this to the examplesListBox_DoubleClick handler in Scripting sample project showed the +/- icons correctly:

Code
Select All
...
diagram.LoadFromXml(document);
OnDiagramLoaded();
// new code
foreach (var node in diagram.Nodes)
	node.Expandable = true; 



Please make sure you are setting Expandable and not Expanded, or otherwise attach a test project reproducing the problem.

Cheers,
Stoyan
  
Back to top
 
IP Logged
 
Rich Cassell
Junior Member
**
Offline


I Love MindFusion!

Posts: 63
Joined: Sep 19th, 2012
Re: Expandable Custom CompositeNode
Reply #3 - May 1st, 2015 at 9:20am
Print Post  
Hi Stoyan,

Thanks. I was simply doing the expandable change in the wrong place, so it was being reset further on... Unusually, the icons still don't show when loading up existing diagrams, but if I save them now and re-load them then they appear - but that's not the end of the world.

Cheers,

Rich Smiley
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint