Hallo,
How does one computationally determine whether the text within a WinLabel spans multiple rows or not. I need to resize the height of the WinLabel if so, according to the number of rows the text requires.
Thanks in advance,
Indika
Hi Indika,
There's really no easy way. You would have to account for the label's borders and then use MeasureString on a graphics object to determine the text size. Can't you just set the Label's AutoSize property to true?
Hallo
The Label's AutoSize property automatically resizes the width. Maybe it is possible to set the property to automatically resize the height?
Otherwise, I could monitor the difference between the specified width, and the width changed by the AutoSize property, and reset the width and recalculate a new height.