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
 
Back
Top