Tag Archives: fit text

See how much text fits in a rectangle in C#

This program determines how much text fits in the left PictureBox and draws it. It then draws the remaining text in the right PictureBox. If you change the form’s size, the size of the PictureBox controls change so how much … Continue reading

Posted in fonts, graphics, strings | Tagged , , , , , , , , , , , , , , , , , | Leave a comment

Size a font to fit a Label in C#

The following SizeLabelFont method shows how to size a font to fit a Label‘s text. It gives a Label the biggest font possible while still allowing its text to fit. // Copy this text into the Label using // the … Continue reading

Posted in fonts, graphics | Tagged , , , , , , , , , , | 5 Comments