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

radButton Wordwrap

3 Answers 311 Views
Buttons, RadioButton, CheckBox, etc
This is a migrated thread and some comments may be shown as answers.
Nancy
Top achievements
Rank 1
Nancy asked on 02 Sep 2008, 05:35 PM
Does the radButton not support word wrap?  It does not seem to do this automatically and I do not see any property to turn it on/off.  Thank you for any information!

3 Answers, 1 is accepted

Sort by
0
Nikolay
Telerik team
answered on 05 Sep 2008, 02:46 PM
Hello Nancy,

In order to enable the word wrapping, you should set the TextWrap property of the TextPrimitive to true:
((TextPrimitive)this.radButton1.ButtonElement.Children[1].Children[1]).TextWrap = true

Additionally, to make your button resizable while wrapping the text, please set the properties below:
this.radButton1.Padding = new Padding(5);  
this.radButton1.RootElement.StretchVertically = false;  
this.radButton1.TextAlignment = ContentAlignment.TopLeft; 

You can also set the above properties in the designer. To do so, click on the RadButton's SmartTag and choose Edit UI Elements. You will see a tree view of the RadButton's subelements. Set the necessary properties to the particular elements.

If you have additional questions, feel free to contact me.
 

Greetings,
Nikolay
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Robert
Top achievements
Rank 1
answered on 04 Dec 2008, 09:42 PM
I am using the demo version of the latest WinForms and I am unable to get the word wrap as discussed above to work.

I get an error of: Error parsing RadItem: Children collection index is not valid: 1 -

This code entry I have.

((Telerik.WinControls.Primitives.TextPrimitive)this.btnOperLogOff.ButtonElement.Children[1].Children[1]).TextWrap = true;

Is there something I am doing wrong here?
0
Nikolay
Telerik team
answered on 09 Dec 2008, 01:11 PM
Hi Robert,

Please find the answer to your question in the support ticket in your Client.Net account >> My Support Tickets

Best wishes,
Nikolay
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Buttons, RadioButton, CheckBox, etc
Asked by
Nancy
Top achievements
Rank 1
Answers by
Nikolay
Telerik team
Robert
Top achievements
Rank 1
Share this question
or