Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic how can I expand an collapse a group (Read 2087 times)
shareef
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 3
Joined: Mar 4th, 2007
how can I expand an collapse a group
Mar 4th, 2007 at 2:40pm
Print Post  
hi there, I would like to know how can I define a group of boxes and arrows and make it collapse and expaned while the rest  of the pathis not affected.

by the way, this is a great product.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: how can I expand an collapse a group
Reply #1 - Mar 5th, 2007 at 5:52am
Print Post  
Hi Shareef,

If all objects in the group can be reached from the group's root node by following the outgoing arrows, it is enough to enable the Expandable property of the boxes in the group.

If there is no path between some box and the root, you might use the AttachTo method to add that box to the group and enable the root.SubordinateGroup.Expandable property. Then the attached box will be expanded/collapsed together with the objects connected to the root through arrows.

If your group is more complex than that, you could set the FlowChart.ExpandButtonAction to RaiseEvents - that will override the standard expand/collapse behavior and let you implement your own expand/collapse logic by handling the TreeExpanded/Collapsed events.

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


I love YaBB 1G - SP1!

Posts: 3
Joined: Mar 4th, 2007
Re: how can I expand an collapse a group
Reply #2 - Mar 5th, 2007 at 6:41am
Print Post  
hi , I think there is a miss understanding.
lets have the path :

1-2-3-4-5-6-7

suppose : 3,4,5 belong to a group called _3_

I would like to have the option of expanding _3_ to 3-4-5 like above and also collapsing it to hsve the path :

1-2-_3_-6-7

is this possible.

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: how can I expand an collapse a group
Reply #3 - Mar 5th, 2007 at 7:19am
Print Post  
Hi,

That should be possible.

If you need to let your users do that, set the Expandable property of box 3 to true, set FlowChart.ExpandButtonAction to RaiseEvents and handle the TreeCollapsed/TreeExpanded event. From the TreeCollapsed handler change the arrow.Origin from 5 to 3, and hide boxes 4 and 5 by setting their Visible property to false. From TreeExpanded restore the arrow Origin and show the boxes.

If you need to show or hide the group only programmatically, you will do something similar, but not from those event handlers.

In both cases you will need to devise a method to store the group relationship, e.g. keep the indices of the group objects in the Tag property of box 3. You could also use the FlowChart.NET Group class to define your group, but that will make boxes 4 and 5 follow the root box 3 when it moves, and you might not want that.

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