Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Size of ContainerNode (Read 4224 times)
Kuzya
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 45
Joined: Dec 19th, 2011
Size of ContainerNode
Dec 23rd, 2013 at 10:47am
Print Post  
Hello  together,
I have a question. With the insertion a DiagrammNode in a ContainerNode the size of ContainerNode changes. Which function reacts to the change? The function NodeModifying () does not react to the change.
Thank you very much.

Kuzya
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Size of ContainerNode
Reply #1 - Dec 23rd, 2013 at 11:48am
Print Post  
Hi,

You can detect the new container size from ContainerChildAdded event handler. You could also disable ContainerNode.AutoShrink to prevent resizing containers to smaller size, but only let them grow. Containers always growing in size is not strictly required anymore - that was necessary in earlier versions when containers could not clip their child nodes' graphics, and dropping a child near the borders would make it stick out of the container. Since we implemented clipping in version 6, now we could also add a property to disable auto-growing when new children are added, if that's what you are trying to achieve.

Stoyan
  
Back to top
 
IP Logged
 
Kuzya
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 45
Joined: Dec 19th, 2011
Re: Size of ContainerNode
Reply #2 - Dec 23rd, 2013 at 12:29pm
Print Post  
My exit situation is following
I have a container with a diagramme inside in the container if I one more children element on the left in diagramme add then container his size and the edges to her connections with elements changes lose. The losing happens only graphically. So I need the reaction on the change the size of container.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Size of ContainerNode
Reply #3 - Dec 23rd, 2013 at 1:08pm
Print Post  
Sorry, I cannot understand you. If you want to assign your custom bounding rectangle to a container, call container.SetBounds(rect, false, true). To resize a container to fit its contents, call ContainerNode.UpdateBounds().

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Size of ContainerNode
Reply #4 - Jan 6th, 2014 at 3:01pm
Print Post  
I cannot reproduce that, please let me know what I should change in this project to see it happen:

https://mindfusion.eu/_samples/TestContainers.zip
  
Back to top
 
IP Logged
 
Kuzya
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 45
Joined: Dec 19th, 2011
Re: Size of ContainerNode
Reply #5 - Jan 6th, 2014 at 4:06pm
Print Post  
This is my problem.
  

Clipboard01.png (Attachment deleted)
Clipboard02.png (Attachment deleted)
Back to top
 
IP Logged
 
Kuzya
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 45
Joined: Dec 19th, 2011
Re: Size of ContainerNode
Reply #6 - Jan 6th, 2014 at 4:09pm
Print Post  
FlowChart. NET demo->; container 4-> the first element (yellow) to the right push the size of container changes and all elements her edges lose.
  

Clipboard03.png (Attachment deleted)
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Size of ContainerNode
Reply #7 - Jan 6th, 2014 at 4:46pm
Print Post  
I cannot reproduce that either. What version of the control are you using?
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint