Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Attached Nodes and Expandable property (Read 3714 times)
BidMaestro
Junior Member
**
Offline


to learn is to live

Posts: 74
Location: Australia
Joined: Apr 20th, 2008
Attached Nodes and Expandable property
Oct 30th, 2008 at 9:16am
Print Post  
...am looking for suggestions on using some of the great features in FlowChart.Net

I create nodes on a diagram that link in a  tree structure and use the expandable property on each branch of the tree. Collapsing and Expanding work fine. On each node I have two attached nodes, which are used to contain label information. One attached node sits on the top of the linked node and the other attached node sits on the on bottom of the linked node....looks good....

Now when I click on collapse/expand button associated with a linked node it hides all the linked children nodes....except their attached label nodes.... is there a property/method that can be utilised to include these attached nodes to hide/appear when their parent linked node is collapsed/expanded?

regards
Doug Livingstone Smiley
  
Back to top
WWW  
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Attached Nodes and Expandable property
Reply #1 - Oct 30th, 2008 at 10:56am
Print Post  
You could set Group.Expandable = true for the SubordinateGroups of tree nodes.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
BidMaestro
Junior Member
**
Offline


to learn is to live

Posts: 74
Location: Australia
Joined: Apr 20th, 2008
Re: Attached Nodes and Expandable property
Reply #2 - Oct 30th, 2008 at 11:15am
Print Post  
Stoyan

Thank you for the prompt response. I have not used groups anywhere in my little exercise. The two label nodes are attached to a node using attachto. Should I be considering setting up a unique Group to assign each Node and two label nodes against?

regards
Doug
  
Back to top
WWW  
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Attached Nodes and Expandable property
Reply #3 - Oct 30th, 2008 at 11:21am
Print Post  
Hi Doug,

Internally AttachTo creates a Group instance, which you can access through the MasterGroup property of the attached node or SubordinateGroup of the main node. So you could enable the Expandable property like this:

label.AttachTo(treeNode...);
treeNode.SubodinateGroup.Expandable = true;

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
BidMaestro
Junior Member
**
Offline


to learn is to live

Posts: 74
Location: Australia
Joined: Apr 20th, 2008
Re: Attached Nodes and Expandable property
Reply #4 - Oct 30th, 2008 at 12:06pm
Print Post  
Stoyan

Fantastic worked a treat....except in my example I have a node (e.g. Xnode) with with three branch nodes linked from it; each with two attached label nodes. The Xnode also has two label nodes attached. When I expand/collapse the Xnode the three linked nodes collapse..... also the label nodes attached the Xnode also collapse.

Is there a way to negate the label nodes attached to Xnode from collapsing when Xnode is the initiator of the collapse/expand?

On some occassions the parent of Xnode may trigger the collapse/expand and on that occassion the Xnode and atached labels (and lower linked nodes) should collapse.

Sorry to be a nuisance on this.... am still learning and hopefully other readers will get some value form this exercise.

Regards
Doug
  
Back to top
WWW  
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Attached Nodes and Expandable property
Reply #5 - Oct 30th, 2008 at 12:59pm
Print Post  
I suppose we should refine this and change the property to an enum type, in order to distinguish between collapsing a root node and collapsing a child node. Until that's ready, you might negate hiding the root's labels by handling the TreeCollapsed and TreeExpanded events and setting the Visible property for the nodes in the subordinate group.

Stoyan
  
Back to top
 
IP Logged
 
BidMaestro
Junior Member
**
Offline


to learn is to live

Posts: 74
Location: Australia
Joined: Apr 20th, 2008
Re: Attached Nodes and Expandable property
Reply #6 - Oct 30th, 2008 at 1:05pm
Print Post  
Stoyan

Once again, thank you for the great service.
I will try your suggestion and close this discussion. At least it gave you some additional development ideas.

regards
Doug
  
Back to top
WWW  
IP Logged
 
BidMaestro
Junior Member
**
Offline


to learn is to live

Posts: 74
Location: Australia
Joined: Apr 20th, 2008
Re: Attached Nodes and Expandable property
Reply #7 - Oct 30th, 2008 at 1:25pm
Print Post  
Stoyan

Final message: I used the TreeCollapsed event to detect the attached label nodes and make them visible..... problem resolved.

thanks
Doug
  
Back to top
WWW  
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint