How to increase the RadLabel height automatically

4 posts, 0 answers
  1. Jeen Valgien
    Jeen Valgien avatar
    1 posts
    Member since:
    Apr 2010

    Posted 22 Apr 2010 Link to this post


         We are using the RadLabel control in part of chat application. I used the RadLabel and keep the AutoSize property True. When I type more contents in that label, the label keep grow in horizontal and not able to view all the entered contents.
         I would like to know how to automatically increase the height of the radlabel baed on the content.


  2. Nikolay
    Nikolay avatar
    1805 posts

    Posted 28 Apr 2010 Link to this post

    Hi Jeen Valgien,

    In order to increase the Height of RadLabel, but not its Width, you should set the appropriate MaximumSize value:
    this.radLabel1.MaximumSize = new Size(50, 0);

    If you need additional assistance, feel free to contact me.

    All the best,
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  3. Hassan
    Hassan avatar
    156 posts
    Member since:
    Aug 2010

    Posted 17 Jan 2011 Link to this post

    I don't like to resurrect old threads but this one is so specific to my question. The original question is still unanswered: I have a panel and in this panel, a RadLabel is docked at top. It's Auto size property is set to true (default). I dynamically set the label's text and even though wrap text is set to true, the label only grow in horizontal direction and doesn't wrap when it hits the docked right boundary. I want ot to grow height-wise once it can't proceed width-wise.
  4. Richard Slade
    Richard Slade avatar
    3000 posts
    Member since:
    May 2009

    Posted 17 Jan 2011 Link to this post

    Hello Hassan,

    In your case, for the RadPanel, set the following

    RadLabel1.MaximumSize = New Size(Me.RadPanel1.Width, Me.RadPanel1.Height)

    Hope that helps
Back to Top