Declined
Last Updated: 15 Sep 2023 11:05 by ADMIN
Yusi
Created on: 08 Jul 2021 03:00
Category: Label
Type: Bug Report
0
RadLabel failed to set MaximumSize

Hi team,

 

To reproduce: Set RadLabel.AutoSize = True, RadLabel.MaximumSize = (100,0). When set the Text property to a string with width wider than 100, the text won't cut off (when TextWrap = false) or wrap to a new line (when TextWrap = true).

 

Workaround: Manually set RadLabel.LabelElement.MaxSize = New Size (100,0). The behavior of the control becomes normal. But it is not convenient as we have to set a large amount of label controls in the code behind rather than to set them in the designer.

 

Thank you.

1 comment
ADMIN
Stoyan
Posted on: 08 Jul 2021 09:05

Hi Yusi,

I have tried the steps that you describe and everything seems to work as expected. 
I use the following setup:

            radLabel1.AutoSize = true;
            radLabel1.MaximumSize = new Size(100, 0);
            radLabel1.Text = "Long Long Long Long Long Long Long Long Long Long Text";
And here is the result without TextWrap:

 

And with TextWrap set to true:

Can you explain in details, what the problem is? It would be better if you can send us screenshots of the problematic behavior and a project that reproduces it.

Thank you in advance for your cooperation. I am looking forward to your reply.

Regards,
Stoyan
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.