How to prevent wrapping text in a Label control

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi there

how can I prevent wrapping text in a Label control? I'd like the label to have a fixed length
so setting AutoSize to true is not an option for me. I'd prefer the label text to be cut when i
exceeds the specified length

Thanks in advance
Dmitry
 
Is it an option to just make the label the exact size you need? Or do you
need it to cut in the middle of a word? You could always paint the text
yourself using Graphics.DrawString.
 
In
how can I prevent wrapping text in a Label control? I'd like the label
to have a fixed length, so setting AutoSize to true is not an option for
me. I'd prefer the label text to be cut when it exceeds the specified
length.

If the height of the label is exactly the right height, it will ->appear
to truncate.

Of course once you've gone to the trouble to figure that out, I suppose
you could just as well clip the text yourself.
 
Back
Top