Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Height of a table cell allowing content to fit (Read 1574 times)
TheEric
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 4
Joined: Mar 20th, 2008
Height of a table cell allowing content to fit
Mar 26th, 2008 at 2:23pm
Print Post  
Hi,

I am using MindFusion.WebChart.FlowChart object to export charts on a web page.

I have some table which display a text in the first row.

I am wishing to compute the row's needed height in order to display all the text but cannot find a way to do it.

I am trying to use TextRenderer.MeasureText() but the resultat is far from accurate. I think this is due to the incorrect TextFormatFlags argument I am using.

I'd like to get the actual TextFormatFlags value used by the grid to draw the text but the closer thing I found is Cell.TextFormat.FormatFlags which is a StringFormFlags Undecided.

Does anyone have any idea about how to achieve this?

I am using Flowchart 4.3.

Thanks in advance,
Eric
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Height of a table cell allowing content to fit
Reply #1 - Mar 26th, 2008 at 2:49pm
Print Post  
Hi,

Try the FlowChart.MeasureString method. For each cell in a row, pass the cell's Width as a value of the maxWidth argument, and set the row.Height to the max of the current height and the size returned by MeasureString.

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


I love YaBB 1G - SP1!

Posts: 4
Joined: Mar 20th, 2008
Re: Height of a table cell allowing content to fit
Reply #2 - Mar 26th, 2008 at 4:14pm
Print Post  
It does exactly what I needed Smiley

I noticed that when text is long, the returned height is a little bigger than needed but that will fit my needs (a little bigger is better than a little smaller).

Thanks again Stoyo!
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint