Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Can you specify the order of attached... (Read 2848 times)
nebbish
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 2
Joined: Dec 1st, 2006
Can you specify the order of attached...
Dec 1st, 2006 at 6:05pm
Print Post  
boxes used in a tree layout?

Hi all,

I've got a tree and want to give the users the capability of re-arranging siblings in the tree - i.e. moving a child to the top of the child list, or down by 1 child.

I have found a way to move children to the bottom of the list by deleting/re-inserting them.

Something like this is what i'm after:

group.AttachToCorner(child, <corner>, <INDEX>)

so i can use 'Index' to put it in the middle of the current list of children.

any thoughts?

thanks in advance,
nebbish
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Can you specify the order of attached...
Reply #1 - Dec 4th, 2006 at 6:39am
Print Post  
Hi,

I think the order of the children depends on the order of arrows in the parent's OutgoingArrows. So using the Insert / Remove methods of the ArrowCollection class or swapping the position of items in that collection should help you define the order of children under a parent node.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Can you specify the order of attached...
Reply #2 - Dec 4th, 2006 at 7:57am
Print Post  
Actually those ArrowCollection methods are available in the .NET version. In the ActiveX one, use the ChangeIndex method to reorder the outgoing arrows.

Stoyan
  
Back to top
 
IP Logged
 
nebbish
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 2
Joined: Dec 1st, 2006
Re: Can you specify the order of attached...
Reply #3 - Dec 4th, 2006 at 5:07pm
Print Post  
Thanks Stoyo, the ChangeIndex method solved my problem nicely.  But I am currently depending on having only 1 incomming arrow, which should be OK with a tree structure.

If I need to I can tag the arrows after first creating the child, when I KNOW there is only 1 incomming arrow.


Thanks again Smiley
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint