Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Resize of a node in a ContainerNode (Read 2989 times)
ilafon
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 9
Joined: May 24th, 2009
Resize of a node in a ContainerNode
Jun 11th, 2009 at 3:12pm
Print Post  
Hello,

When I'm resizing programatically a node inside a container (using Resize method), the method OnChildModified of my derived ContainerNode is not called. Is it normal?

Thanks in advance for the information.

Isabelle.
  
Back to top
 
IP Logged
 
MUDO
Junior Member
**
Offline



Posts: 90
Joined: Nov 29th, 2008
Re: Resize of a node in a ContainerNode
Reply #1 - Jun 11th, 2009 at 6:59pm
Print Post  
Hi people!

Is this forgotten thread?

I have the same problem. Pls ilafon or Stoyo Smiley provide any solution if there is.

How I know if node is in container? Then I can call Container.UpdateBounds()... But getting a Container is problem Sad

Thx.

...MUDO...
  
Back to top
 
IP Logged
 
ilafon
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 9
Joined: May 24th, 2009
Re: Resize of a node in a ContainerNode
Reply #2 - Jun 11th, 2009 at 7:47pm
Print Post  
Hi,

This is not a forgotten thread but a new thread Smiley

Here is the way I use to know if a node is inside a container.

node.MasterGroup != null && node.MasterGroup.MainItem != null &&
node.MasterGroup.MainItem is ContainerNode.

the node.MasterGroup.MainItem is your ContainerNode.

Hope this help.

Isabelle.
  
Back to top
 
IP Logged
 
MUDO
Junior Member
**
Offline



Posts: 90
Joined: Nov 29th, 2008
Re: Resize of a node in a ContainerNode
Reply #3 - Jun 11th, 2009 at 7:58pm
Print Post  
Hi ilafon!

Thx so much! Hmmm MasterGroup...I was confused how to use MasterGroup & SubordinateGroup Wink

Now I know how to solve my problem Smiley

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Resize of a node in a ContainerNode
Reply #4 - Jun 12th, 2009 at 6:03am
Print Post  
Hi Isabelle,

OnChildModified is called when a child is modified interactively. You'll have to move your child-modification processing code to a method and call it both from OnChildModified and after calling child.Resize(). If the child nodes are from a derived class too, you could do that from an override of the OnUpdateBounds() method.

Mudo, you might also call the static ContainerNode.GetContainer(node) method to find a node's container.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
ilafon
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 9
Joined: May 24th, 2009
Re: Resize of a node in a ContainerNode
Reply #5 - Jun 12th, 2009 at 11:30am
Print Post  
Hi,

Thanks for your help. It's working fine and it's simpler than what I did first.

Isabelle.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint