Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Want to access childNode of GroupNode (Read 2507 times)
Bala
Full Member
***
Offline


I love YaBB 1G - SP1!

Posts: 156
Joined: Apr 21st, 2009
Want to access childNode of GroupNode
Apr 21st, 2009 at 1:44pm
Print Post  
Hi,

I have created a groupNode of some childNode and made it transparent. Now when I click on Group Button, I get all the child node inside that groupNode but when I drag this groupNode, all childNode gets invisible. I want two things.

1. I want to see all child nodes every time (includes while dragging) in that groupNode.
2. I want to access any child node while they are inside the group (like I want to perform DoubleClick on childNode which is inside a groupNode.

Regards,
Bala

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Want to access childNode of GroupNode
Reply #1 - Apr 22nd, 2009 at 9:06am
Print Post  
Hi,

You can access the child nodes through the SubordinateGroup property of the group node.

There are a few problems in the group methods in the project you sent us.

First, in the nodeGroup() method, calling diagram.Factory.CreateShapeNode automatically adds the node to Diagram.Nodes, so you should not call diagram.Nodes.Add(n) after that. The Factory methods are just a shortcut to using the new operator to create an object and calling Nodes.Add().

Second, in the CreateGroup method you call child.AttachTo(node, 90, 90, 90, 90). This sets the child nodes width and height to zero when the group is moved. Call child.AttachTo(node, AttachToNode.TopLeft) and the group will work as you expect.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Bala
Full Member
***
Offline


I love YaBB 1G - SP1!

Posts: 156
Joined: Apr 21st, 2009
Re: Want to access childNode of GroupNode
Reply #2 - Apr 22nd, 2009 at 10:49am
Print Post  
Hi Stoyan,

Many thanks for the reply

First,its woking Smiley

Second,I am still unable to perform any operation on child Node(which are inside a parent node).

Is their any way to put groupNode in back(like put to back or bring in front kind of functionality) so that front member(childs) can be accessed ?


Regards,
Bala
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Want to access childNode of GroupNode
Reply #3 - Apr 22nd, 2009 at 12:36pm
Print Post  
Hi,

Set groupNode.ZIndex = 0.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Bala
Full Member
***
Offline


I love YaBB 1G - SP1!

Posts: 156
Joined: Apr 21st, 2009
Re: Want to access childNode of GroupNode
Reply #4 - Apr 22nd, 2009 at 1:37pm
Print Post  
Thanks alot stoyan,its working Smiley
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint