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

How do I make RadButton text appear with ellipsis when too long?

3 Answers 56 Views
Buttons, RadioButton, CheckBox, etc
This is a migrated thread and some comments may be shown as answers.
Mark
Top achievements
Rank 1
Mark asked on 10 Oct 2014, 06:27 PM
Let's say I have a RadButton of width 200 px.  I want the button text to be automatically shortened with an ellipsis (...) at the end if the text is too long to fit in the button width.

How do I do that?

3 Answers, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 13 Oct 2014, 06:40 AM
Hello Mark,

Thank you for writing.

This can be achieved by setting the AutoEllipsis property of the text element to true (which is also a default setting):
radButton1.ButtonElement.TextElement.AutoEllipsis = false;

I hope that you find this information useful. Should you have any other questions, do not hesitate to contact us.

Regards,
Stefan
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Mark
Top achievements
Rank 1
answered on 13 Oct 2014, 06:17 PM
Thanks, but this doesn't quite do it.

I have a RadButton with the image set and this property set:

TextImageRelation = ImageBeforeText

If TextImageRelation is left to the default value of Overlay, the ellipsis works, but the text overlays the image.  If I change the value to ImageBeforeText, the button text is not ellipsed.  I want the text to the right of the image AND show the ellipsed button text.
0
Stefan
Telerik team
answered on 14 Oct 2014, 10:17 AM
Hello Mark,

I have tested placing the image both before and after the text and the text is AutoEllipsed correctly. Please refer to the attached sample and let me know what I am missing.

I am looking forward to your reply.

Regards,
Stefan
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
Buttons, RadioButton, CheckBox, etc
Asked by
Mark
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Mark
Top achievements
Rank 1
Share this question
or