Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Layout problem? (Read 2303 times)
chris
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 57
Joined: Feb 1st, 2008
Layout problem?
Dec 19th, 2008 at 11:37pm
Print Post  
Hi Stoyan,
I use the following code to append a label under a ShapeNode.

    ShapeNode node = diagram.Factory.CreateShapeNode(40, 40, 80, 40);
     node.EnabledHandles = AdjustmentHandles.Move;
    node.Shape = Shape.FromId("...");
     ShapeNode labelNode = Canvas.Factory.CreateShapeNode(0, 80, 80, 20);
        labelNode.AttachTo(node, AttachToNode.BottomCenter);
     labelNode.Locked = true;
     labelNode.Text = "Label";
     labelNode.Transparent = true;
     node.SubordinateGroup.AutoDeleteItems = true;
        node.SubordinateGroup.FollowMasterContainment = true;

When I define a Layout and call the Arrange method, the labe node is regarded as a normal ShapeNode and is separated from the master node.
        LayeredLayout layout = new LayeredLayout();
        // Perform the actual arrangement
        layout.Arrange(diagram);

Is it a bug for Layout?

Thanks a lot!

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Layout problem?
Reply #1 - Dec 19th, 2008 at 11:45pm
Print Post  
Hi Chris,

Set labelNode.IgnoreLayout = true, or layout.KeepGroupLayout = true.

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


I love YaBB 1G - SP1!

Posts: 57
Joined: Feb 1st, 2008
Re: Layout problem?
Reply #2 - Dec 22nd, 2008 at 8:53pm
Print Post  
Thanks Stoyan.

Merry Christmas and happy new year!
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Layout problem?
Reply #3 - Dec 23rd, 2008 at 6:03am
Print Post  
Merry Christmas to you too 8)
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint