Page Index Toggle Pages: 1 Send TopicPrint
Hot Topic (More than 10 Replies) Attached shape node in container (Read 4109 times)
marie
Full Member
***
Offline



Posts: 147
Joined: Nov 11th, 2008
Attached shape node in container
Dec 15th, 2008 at 4:11pm
Print Post  
Hi,

I have table nodes in a container. When I fold the container, the shape nodes that are attached to the table nodes remain painted at their old position instead of being hidden as they should. How can I fix that?

Note: When I move the folded container, the shape nodes are moved and if I unfold it, it's fine.

Also, when I fold the container, the width is changed (it gets so small that the caption doesn't fit anymore). The width seems to be set to diagram.ContainerMinimumSize.Width. How can I fix that 2nd problem?

Thanks,
Marie
« Last Edit: Jan 6th, 2009 at 5:51pm by marie »  
Back to top
 
IP Logged
 
marie
Full Member
***
Offline



Posts: 147
Joined: Nov 11th, 2008
Re: Attached shape node in container
Reply #1 - Dec 15th, 2008 at 9:02pm
Print Post  
Hi,

I have a 3rd question. How do I move a node programatically within a container? When the node is added to the container, it gets moved to a default position and after that I don't know how to change its position programatically. I tried using node.Bounds.X & Y, but a change in those doesn't visually move the nodes.

Thanks,
Marie
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Attached shape node in container
Reply #2 - Dec 16th, 2008 at 6:36am
Print Post  
Hi,

After attaching the shape nodes, set table.SubordinateGroup.FollowMasterContainment = true.

To move a node inside a container set the node's Bounds and call container.UpdateBounds().

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
marie
Full Member
***
Offline



Posts: 147
Joined: Nov 11th, 2008
Re: Attached shape node in container
Reply #3 - Dec 16th, 2008 at 12:45pm
Print Post  
Hi Stoyan,

Thanks Smiley

However, you forgot one question again:
When I fold the container, the width is changed (it gets so small that the caption doesn't fit anymore). The width seems to be set to diagram.ContainerMinimumSize.Width. How can I fix that problem?

Thanks,
Marie
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Attached shape node in container
Reply #4 - Dec 16th, 2008 at 2:03pm
Print Post  
Hi Marie,

We'll have to add some property to let you control that. For the time being you could handle the ContainerFolded event, call Diagram.MeasureString(caption), and if container.Bounds.Width is smaller than what MeasureString() returns, assign to it a larger RectangleF.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
marie
Full Member
***
Offline



Posts: 147
Joined: Nov 11th, 2008
Re: Attached shape node in container
Reply #5 - Dec 16th, 2008 at 2:04pm
Print Post  
Hi Stoyan,

Is it possible to catch when the container is folded and change its width to fit the original width? I can see the original width in the private members of the container, I just don't know if/how to access it...

For now, it's annoying, because if I want to toggle between folded/unfolded, I need to move the mouse in between...

Thanks,
Marie
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Attached shape node in container
Reply #6 - Dec 16th, 2008 at 2:31pm
Print Post  
You could handle ContainerFolded, see above. If you can see the original width through the debugger, you could use reflection to get the value of that field. We'll add some property to let you access it in the next release.
  
Back to top
 
IP Logged
 
marie
Full Member
***
Offline



Posts: 147
Joined: Nov 11th, 2008
Re: Attached shape node in container
Reply #7 - Jan 6th, 2009 at 2:31pm
Print Post  
Hi!

I did that (the field name is x3dd386b2ed9f5b71). Do you know if a next release is planned soon?

Happy New Year!
Marie
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Attached shape node in container
Reply #8 - Jan 6th, 2009 at 3:58pm
Print Post  
Happy New Year!

We'll release it in a couple of weeks. I can send you a pre-release build if you need it urgently.

Stoyan
  
Back to top
 
IP Logged
 
marie
Full Member
***
Offline



Posts: 147
Joined: Nov 11th, 2008
Re: Attached shape node in container
Reply #9 - Jan 6th, 2009 at 5:51pm
Print Post  
Thanks Cheesy !

I can wait. I did the fix meanwhile.

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Attached shape node in container
Reply #10 - Jan 7th, 2009 at 10:45am
Print Post  
I've sent you a download link on the private message page anyway. Now there is ContainerNode.UnfoldedSize property, please check if it works well for you.

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