Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Question about attach a node to another (Read 2260 times)
CanadaProgrammer
Full Member
***
Offline


I love YaBB 1G - SP1!

Posts: 113
Joined: Jun 30th, 2011
Question about attach a node to another
Feb 20th, 2014 at 5:48pm
Print Post  
I want to move a node A and another node B can follow A to anywhere. And the requirements is :
1. There 2 nodes beside border by border and not cover each other any more
2. To move A cause node B follow A
3. Move B, B only can be moved along the border of A

So far I do believe I can do it if I override StarDraw method or other methods something like that. But that means I should do everything by myself. If this feature supported by this lib directly or there is a easier way to do this then it is very good.

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Question about attach a node to another
Reply #1 - Feb 21st, 2014 at 6:42am
Print Post  
Quote:
2. To move A cause node B follow A


Call B.AttachTo(A);

Quote:
3. Move B, B only can be moved along the border of A


Try enabling AutoAlignNodes and handling the QueryAlignTarget event to allow aligning only to A when B is selected.

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


I love YaBB 1G - SP1!

Posts: 113
Joined: Jun 30th, 2011
Re: Question about attach a node to another
Reply #2 - Feb 21st, 2014 at 5:02pm
Print Post  
Thanks a lot. Looks it can work, I will try to do it later.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint