Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Creating a diagram with a minimum size   (Read 1743 times)
jlj30
Full Member
***
Offline


I love YaBB 1G - SP1!

Posts: 183
Joined: Sep 4th, 2011
Creating a diagram with a minimum size  
Nov 30th, 2011 at 6:23pm
Print Post  
Hi,

I am using diagram.ResizeToFitItems, but would like to ensure that the diagram meets a certain "minimum" size requirement. 

Any suggestions?

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Creating a diagram with a minimum size  
Reply #1 - Nov 30th, 2011 at 6:28pm
Print Post  
Hi,

Try this:

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

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: Creating a diagram with a minimum size  
Reply #2 - Nov 30th, 2011 at 7:16pm
Print Post  
Hi,

Although this looked promising (after I took note of what Union did), it did not address my issue.  I tried it before and after the ResizeToFitItems with no difference in result.

Perhaps I need to explain that I am using "swim lanes", and that I really need the first (and only) column to be a minimum width regardless of the number of shapes placed in the lane.

In essence, I'd really like to make the column header a minimum width - much like "MinHeaderSize" which seems to only address the height of a column header.

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Creating a diagram with a minimum size  
Reply #3 - Dec 1st, 2011 at 8:05am
Print Post  
Hi,

I think the column width stays fixed, as set through to the Width property of the column header. However if you are using SwimlaneLayout, it might be resizing the column to fit the nodes inside. If you want the grid to have some minimum size in such case, you will have to reset header.Width after applying the layout if you detect it got smaller than the min.value.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint