Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Containers-size and position (Read 1320 times)
MUDO
Junior Member
**
Offline



Posts: 90
Joined: Nov 29th, 2008
Containers-size and position
May 21st, 2009 at 1:55am
Print Post  
Hi.

1)
I add table to container like this:

Code
Select All
Dim LoMMContainerNode As ClsMMContainerNode = OoAction.Data("CONTAINER")

Dim LoMMTableNode As ClsMMTableNode = New ClsMMTableNode(Me.fcDiagram)

Me.fcDiagram.Nodes.Add(LoMMTableNode)
LoMMContainerNode.Add(LoMMTableNode)
 



LoMMContainerNode has bounds set from constructor -- > (0, 0, 50, 50)
LoMMTableNode has bounds set from constructor -- > (0, 0, 30, 50)

After added table to container, container is in top left corner partially invisible. Is this because container is adapting to tables position?

How to preserve position of container and add table to it?


2) I have node in container and via code Im changing size of node. How to update size of container also? Its size is not changed after resizing a node in container via code.

Thx.

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Containers-size and position
Reply #1 - May 21st, 2009 at 5:17am
Print Post  
Hi,

1. Try disabling AutoShrink before adding the node.
2. Call ContainerNode.UpdateBounds.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
MUDO
Junior Member
**
Offline



Posts: 90
Joined: Nov 29th, 2008
Re: Containers-size and position
Reply #2 - May 21st, 2009 at 7:06am
Print Post  
Hi.

Sub from derived class from ContainerNode:

Code
Select All
'adding node to container
    Public Sub AddNodeToContainer(ByRef OoNode As DiagramNode)
        OoNode.Bounds = (New RectangleF(Me.Bounds.Location, OoNode.Bounds.Size))
        Me.Add(OoNode)
        Me.UpdateBounds()
    End Sub
 



Works perfect. Thaks Stoyo Smiley

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