Tag Archives: StringFormatFlags

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

Perform line clipping in C#

The example Perform line trimming in C# shows how to determine what the DrawString method does when the last line of text doesn’t fit horizontally in a formatting rectangle. This example shows how to perform line clipping when the last … Continue reading

Posted in drawing, fonts, graphics | Tagged , , , , , , , , , , , , , | 1 Comment