Page Index Toggle Pages: 1 [2]  Send TopicPrint
Hot Topic (More than 10 Replies) Grouping of items (Read 9738 times)
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Grouping of items
Reply #15 - Apr 14th, 2009 at 7:51am
Print Post  
Calling AttachTo does not move the child node inside the group node automatically; it just ensures that the nodes will retain their relative position when the group node is moved. If you need that, you should set the child's Bounds coordinates to be inside the parent's Bounds before calling AttachTo. If you apply some layout algorithm, you should run the layout using the KeepGroupLayout option.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Anshul
Senior Member
****
Offline


I love YaBB 1G - SP1!

Posts: 316
Joined: Apr 3rd, 2009
Re: Grouping of items
Reply #16 - Apr 15th, 2009 at 9:28am
Print Post  
Hi Stoyan,

I have a groupNode which is a collection of some ShapeNode,Now what I want is; OnDoubleClick on groupNode I want to display all the child nodes of this groupNode and this groupNode should be removed from the diagram.

I have tried something like this but its not working..

DiagramNode node = diagram.ActiveItem as DiagramNode;
           if (node != null)
           {
               node.Detach();
           }

Now plz tell me what I can do ?

I hope you helps Smiley


Thanks,
Anshul

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Grouping of items
Reply #17 - Apr 15th, 2009 at 10:59am
Print Post  
Code
Select All
private void OnNodeDoubleClicked(object sender, NodeEventArgs e)
{
	if (e.Node.SubordinateGroup != null)
	{
		foreach (DiagramNode child in e.Node.SubordinateGroup.AttachedNodes)
			child.Visible = true;
		e.Node.SubordinateGroup.AutoDeleteItems = false;
		diagram.Nodes.Remove(e.Node);
	}
}
 



I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Anshul
Senior Member
****
Offline


I love YaBB 1G - SP1!

Posts: 316
Joined: Apr 3rd, 2009
Re: Grouping of items
Reply #18 - Apr 15th, 2009 at 12:42pm
Print Post  
nops,its not working...
The group node is deleted but I am not able to see the child nodes.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Grouping of items
Reply #19 - Apr 15th, 2009 at 12:54pm
Print Post  
Add a Debug.WriteLine(child.Bounds.ToString()) to check if the children are inside the group node's Bounds. If you apply some layout without using the KeepGroupLayout option, the children might not be where you expect them.

Stoyan
  
Back to top
 
IP Logged
 
Anshul
Senior Member
****
Offline


I love YaBB 1G - SP1!

Posts: 316
Joined: Apr 3rd, 2009
Re: Grouping of items
Reply #20 - Apr 20th, 2009 at 3:55pm
Print Post  
Hi Stoyan,

I have created a groupNode of some childNode and put it transparent.Now when I click on Group Button, I gets all the child node inside that groupNode but when I drag this groupNode,all chilNode gets invisible.
I want to see all child nodes everytime(includes while dragging) in that groupNode.

I hope you helps Smiley

Thanks,
Anshul
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Grouping of items
Reply #21 - Apr 21st, 2009 at 9:28am
Print Post  
Could you save that group to an XML file and email it to support@mindfusion.eu?
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1 [2] 
Send TopicPrint