Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
250
Multiline WinLabels
posted

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

Parents
No Data
Reply
  • 469350
    Verified Answer
    Offline posted

    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? 

Children