Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Prevent User putting Containers in Containers (Read 2470 times)
fanderlf
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 12
Joined: May 5th, 2009
Prevent User putting Containers in Containers
Jul 9th, 2009 at 2:13pm
Print Post  
Hello,

In my app I create ContainerNodes containing some ShapeNodes. The User is only allowed to move the ContainerNodes. When I drop one ContainerNode over another, the dropped container is put in the other container (as intended).
I've tried to remove the container from the other in the ContainerChildAdded Event Handler, but that changes the size of the ContainerNode.
Is there any possibility to prohibit this behaviour? I do like the ContainerNodes very much for my Layout. They size themselves nicely and can be folded.

Thanks in advance Smiley

  
Back to top
 
IP Logged
 
fanderlf
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 12
Joined: May 5th, 2009
Re: Prevent User putting Containers in Containers
Reply #1 - Jul 9th, 2009 at 2:20pm
Print Post  
-.- OK i just found it.

I've overwridden the OnDropOver Function in my ContainerNode class. It now just returns true (which I assume means, that the drop was succesfull).

That has done the trick Smiley

Maybe someone could confirm that this is "legal" and doesn't cause any mistakes anywhere else.

Thank you!!!
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Prevent User putting Containers in Containers
Reply #2 - Jul 9th, 2009 at 2:51pm
Print Post  
It's perfectly legal 8)
  
Back to top
 
IP Logged
 
fanderlf
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 12
Joined: May 5th, 2009
Re: Prevent User putting Containers in Containers
Reply #3 - Jul 10th, 2009 at 10:15am
Print Post  
One thing that irritated me was the function name. I was searching for the OnDragDrop function. Seems you got a little naming mistake here Grin
  
Back to top
 
IP Logged
 
MUDO
Junior Member
**
Offline



Posts: 90
Joined: Nov 29th, 2008
Re: Prevent User putting Containers in Containers
Reply #4 - Aug 13th, 2009 at 9:25pm
Print Post  
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint