Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Want to know About event during node.move() (Read 3030 times)
Bala
Full Member
***
Offline


I love YaBB 1G - SP1!

Posts: 156
Joined: Apr 21st, 2009
Want to know About event during node.move()
May 14th, 2009 at 11:03am
Print Post  
Hi,

I have some node in my diagram.When I select some node and press AllignLeft, all nodes shifted to left direction.I want to know Is their any event,which is being called in this process of moving?

I have already tried for Diagram.SelectionMoving,Diagram.SelectionMoved,Diagram.NodeModified,Diagram.Node
StartModifying,Diagram.SelectionChanged event.

The code which I am using to allign left is
node.Move(active.Bounds.X, node.Bounds.Y);


Please suggest.


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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Want to know About event during node.move()
Reply #1 - May 14th, 2009 at 1:08pm
Print Post  
Hi,

There is no event raised by Move. You could call node.SetRect(rect, true) to get NodeModified raised.

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 know About event during node.move()
Reply #2 - May 15th, 2009 at 5:54am
Print Post  
Thanks Stoyan,this is helpful for me.
  
Back to top
 
IP Logged
 
Anshul
Senior Member
****
Offline


I love YaBB 1G - SP1!

Posts: 316
Joined: Apr 3rd, 2009
Re: Want to know About event during node.move()
Reply #3 - May 15th, 2009 at 8:23am
Print Post  
Hi Stoyo,

I have arranged some nodes in Hierarchical, Compact, Horizontal and Vertical layout.
I want to know about the event which is being fired when I use any one of these.

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Want to know About event during node.move()
Reply #4 - May 15th, 2009 at 8:59am
Print Post  
The layout classes have a LayoutNode delegate property. Assign your method with the same signature to it, and the layout function will call it for each node.

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 know About event during node.move()
Reply #5 - May 19th, 2009 at 4:48am
Print Post  
Hi Stoyo,

I am not getting what you wrote.Did you mean by this kind of code?

layeredLayout.LayoutNode = delegate(object sender, NodeEventArgs e){ };


1. Could you please send a snippet of code, showing how to use delegate for each node of Layout?(I want to call NodeModified or any other event through this delegate).

2. After layeredLayout.Arrange(diagram), I want new x,y position of nodes.How can I get it?

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Want to know About event during node.move()
Reply #6 - May 19th, 2009 at 7:38am
Print Post  
1. Add a void LayoutNodeHandler(DiagramNode node, RectangleF oldBounds) { ... } mehod to your class and set layeredLayout.LayoutNode = LayoutNodeHandler.

2. Use DiagramNode.Bounds.X and Y.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint