Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic fit the text inside the box (Read 1946 times)
Jose
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 12
Joined: Mar 7th, 2008
fit the text inside the box
Mar 7th, 2008 at 10:07am
Print Post  
Hey Stoyan,
  How can I set the size (width) of the box with respect to the text it contains.. I saw one property FitSizeToText() but it was changing both the width and height, and that too to very large size. (bug?) I just need to fit the text correctly inside the box without affecting its height.

thanx in advance..
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: fit the text inside the box
Reply #1 - Mar 7th, 2008 at 11:38am
Print Post  
Hi Jose,

When using the tsFitPoly* text styles, FitSizeToText keeps the initial aspect ratio of the box. You might use FlowChart.MeasureString to get the size needed to fit the text, and then set the box width to the MeasureString result. Add 1mm margins the found width, otherwise the text might not fit in the box.

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


I love YaBB 1G - SP1!

Posts: 12
Joined: Mar 7th, 2008
Re: fit the text inside the box
Reply #2 - Mar 7th, 2008 at 11:54am
Print Post  
good results.. thanks..
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint