Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Container Resized Problem (Read 1342 times)
lripple
YaBB Newbies
*
Offline



Posts: 1
Joined: Nov 10th, 2011
Container Resized Problem
Nov 10th, 2011 at 1:30pm
Print Post  
I was wondering if there was an event that is fired when you resize nodes out of a container? 

I am using both ContainerChildAdded and ContainerChildRemoved, however these don't seem to be called if you resize a container to no longer contain the nodes. 

Is there anyway to know what just got affected by the resize?
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Container Resized Problem
Reply #1 - Nov 10th, 2011 at 8:49pm
Print Post  
How have you managed to resize a container - doesn't it resize itself automatically to fit all its children? Even if you have overridden some method to allow manual resize, a child node probably won't detach automatically if the container is resized to no longer contains the child geometrically. Perhaps you should handle the NodeModified event raised for the container, and loop over its SubordinateGroup.AttachedNodes to call Remove for the ones that are no longer inside - i.e. when container.Bounds.Contains(child.Bounds) returns false.

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