Hello,
I tried to remove the text indent of RadLabel but i couldn't.
Should I make the RadLabel's text have no any indents?
As in the attachment, I already set the margin and padding to 0
Please help me
Thanks,
4 Answers, 1 is accepted
You can use negative padding for this:
radLabel1.LabelElement.Padding = new Padding(-3, 0, 0, 0);
Do not hesitate to contact us if you have other questions.
Dimitar
Telerik by Progress
Hello Dimitar,
Your solution working well for me
Thanks you so much for your help
Regard,
Paull
Hi Dimitar.
But what if there is text and an image at the same time?
The picture is on the left but; text should not be on the left, away from the left edge by the specified pixel. How can we do that?
Hello, özer,
According to the provided information, it seems that you have an image to the left in RadLabel. In order to distance the text from the image to specified pixels, you can set the Margin property of the TextPrimitive to the desired value:
this.radLabel1.Image = Resources.MailNew;
this.radLabel1.TextImageRelation = TextImageRelation.ImageBeforeText;
// set Margin property
this.radLabel1.LabelElement.LabelText.Margin = new Padding(55, 0, 0, 0);
I hope this helps. Let me know if you have further difficulties.
Regards,
Nadya
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/.