Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Issue with ResizeToFitItems in swimlanelayout (Read 2150 times)
binuvc
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 46
Joined: Nov 7th, 2011
Issue with ResizeToFitItems in swimlanelayout
Jan 17th, 2012 at 6:57am
Print Post  
Hi,

I created a swimlane layout and then :

   layout.Arrange(diag1);
   diag1.ResizeToFitItems(0, false);


The lane headers which are custom templates are not visible.
If i increase the margin to 200  lane headers become visible. but the margin creeps up on all the four sides which is not desired.

Please advice.
BinuVC
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Issue with ResizeToFitItems in swimlanelayout
Reply #1 - Jan 17th, 2012 at 11:22am
Print Post  
Hi,

Unfortunately ResizeToFitItems does not consider the grid size. Try this instead:

Code
Select All
var sl = new SwimlaneLayout();
sl.Margins = new Size(
      diagram.LaneGrid.GetRowHeaderBounds().Width,
      diagram.LaneGrid.GetColumnHeaderBounds().Height);
sl.Arrange(diagram);

var rect = diagram.LaneGrid.GetColumnHeaderBounds();
rect.Union(diagram.LaneGrid.GetRowHeaderBounds());
diagram.Bounds = rect; 



I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
binuvc
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 46
Joined: Nov 7th, 2011
Re: Issue with ResizeToFitItems in swimlanelayout
Reply #2 - Jan 17th, 2012 at 11:47am
Print Post  
Stoyan,

I was just drafting another entry with images so that you can have a better look at the issue.( I myself was not able to understand the entry i made when read after some time   : lol)

The solution you suggested is working great.

I think resizetofititems is only considering the diagramitems and not any layout controls in the diagram.

Many thanks for the solution.

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