This is a migrated thread and some comments may be shown as answers.

How to increase the RadLabel height automatically

4 Answers 314 Views
Label
This is a migrated thread and some comments may be shown as answers.
Jeen Valgien
Top achievements
Rank 1
Jeen Valgien asked on 22 Apr 2010, 06:05 PM
Hi,

     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.

Thanks,

Jeen

4 Answers, 1 is accepted

Sort by
0
Nikolay
Telerik team
answered on 28 Apr 2010, 04:57 PM
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,
Nikolay
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.
0
DoomerDGR8
Top achievements
Rank 2
Iron
Iron
Iron
answered on 17 Jan 2011, 03:34 PM
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.
0
Richard Slade
Top achievements
Rank 2
answered on 17 Jan 2011, 04:17 PM
Hello Hassan,

In your case, for the RadPanel, set the following

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

Hope that helps
Richard
0
Jarrad
Top achievements
Rank 1
Iron
answered on 21 Feb 2024, 01:37 PM
Would love to get an answer to this. I am dealing with the same issue, and the above does not fix it. 
Nadya | Tech Support Engineer
Telerik team
commented on 22 Feb 2024, 11:25 AM

Hello, Jarrad,

Setting the MaximumSize property is working on my side. The label text shrinks according to the size of the panel. Is there something different on your side?

Please let me know if you have further difficulties. You can submit your answer directly into the ticket that you have opened on the same topic.

Tags
Label
Asked by
Jeen Valgien
Top achievements
Rank 1
Answers by
Nikolay
Telerik team
DoomerDGR8
Top achievements
Rank 2
Iron
Iron
Iron
Richard Slade
Top achievements
Rank 2
Jarrad
Top achievements
Rank 1
Iron
Share this question
or