Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic ResizeToFitItems does not accomodate column or row headers when using SwimlaneLayout (Read 2819 times)
jlj30
Full Member
***
Offline


I love YaBB 1G - SP1!

Posts: 183
Joined: Sep 4th, 2011
ResizeToFitItems does not accomodate column or row headers when using SwimlaneLayout
Feb 3rd, 2014 at 9:21pm
Print Post  
Hi,

I have been specifying a margin to compensate for what appears to be the fact that ResizeToFitItems does not appear to include the width/height of row/column headers when using SwimlaneLayout.

This results in an additional right/bottom margin that I really don't want.

Is this a bug, or am I missing something?

Thanks in advance.

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: ResizeToFitItems does not accomodate column or row headers when using SwimlaneLayout
Reply #1 - Feb 4th, 2014 at 5:55am
Print Post  
Try this:
Code
Select All
RectangleF columnHeaderBounds = diagram.LaneGrid.GetColumnHeaderBounds();
RectangleF rowHeaderBounds = diagram.LaneGrid.GetRowHeaderBounds();
RectangleF laneGridBounds = RectangleF.Union(columnHeaderBounds, rowHeaderBounds);

RectangleF itemsBounds = diagram.GetContentBounds(false, false);
diagram.Bounds = RectangleF.Union(itemsBounds, laneGridBounds); 



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


I love YaBB 1G - SP1!

Posts: 183
Joined: Sep 4th, 2011
Re: ResizeToFitItems does not accomodate column or row headers when using SwimlaneLayout
Reply #2 - Feb 4th, 2014 at 3:06pm
Print Post  
Hi,

Yes, this worked.
I just had to add a small amount to the height and width otherwise the bottom and right borders did not show.

diagram.Bounds = new RectangleF(0F, 0F, diagram.Bounds.Width + 2F, diagram.Bounds.Height + 5F);

Thanks

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