How do I determine if text fits into my label or not?

D

Dave

I have a label on a small form. I need to determine if the text in the
label fits in the label. My end goal is to reduce the font size of the text
in the label until it fits.

How can I do this via code?

Thanks,

-Dave
 
H

Herfried K. Wagner [MVP]

Dave said:
I have a label on a small form. I need to determine if the text in the
label fits in the label. My end goal is to reduce the font size of the
text
in the label until it fits.

'Graphics.MeasureString' (see documentation).
 

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

Top