Getting the right height of a RectangleF for a string...

  • Thread starter Thread starter Carsten Marx
  • Start date Start date
C

Carsten Marx

Hi,
is there any chance to calculate the Height of a RectangleF in a easy
way for a given String if i had allready set the Font and the Widht of
the RectangleF?

..... or do i need some tricky statements...

Regards
Carsten
 
Carsten,

Try System.Drawing.Graphics.MeasureString(String, Font). This will return a
RectangleF containing the height and width of the string in the given font.

HTH
Dan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top