Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Tree layout and images (Read 2054 times)
Espen Lodden
Guest


Tree layout and images
Dec 12th, 2005 at 12:24pm
Print Post  
I am trying to apply a tree layout with MindFusion.FlowChartX.Table-objects in a tree. Each of these nodes are grouped together with a MindFusion.FlowChartX.Box containing an image using a . I draw the box with the image within the bounding rectangle of the Table nodes, but after applying the treelayout, the image-boxes are neatly arranged in the top of the diagram to the far right.

Does anybody have an idea of what I'm doing wrong?

  RectangleF rc = _flowChartTable.BoundingRect;
           Box icon = FlowChart.CreateBox(rc.Left, rc.Top, 32, 32);


           icon.Transparent = true;            icon.Picture = new Bitmap("C:\\temp\\Image.gif");
           icon.PicturePos = EImagePos.imgCenter;


           _group = FlowChart.CreateGroup(_flowChartTable);
           _group.AttachToCorner(icon, 1);
           icon.Locked = true;
           icon.Tag = 1;
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Tree layout and images
Reply #1 - Dec 12th, 2005 at 12:53pm
Print Post  
Add this line after creating the icon box:

icon.IgnoreLayout = true;

Otherwise the tree layout routine considers the icon boxes to be separate tree nodes and tries to arrange them too.
  
Back to top
 
IP Logged
 
Espen Lodden
Guest


Re: Tree layout and images
Reply #2 - Dec 12th, 2005 at 1:06pm
Print Post  
Ah, thanks!

I thought IgnoreLayout would do the exact opposite, works now...
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint