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

Cannot find TextOrientation through API

2 Answers 33 Views
Buttons, RadioButton, CheckBox, etc
This is a migrated thread and some comments may be shown as answers.
Maria
Top achievements
Rank 1
Maria asked on 24 Jan 2018, 01:26 PM

Hello there,

I added a RadButton to my WInForm and although I can find TextPrimitive.TextOrientation property in the Designer, I cannot find it through the Telerik API so I can change it in runtime!

Telerik Designer and API are not consistent with each other?

Any idea on how I can resolve my problem?  

Thank you,

Maria

2 Answers, 1 is accepted

Sort by
0
Maria
Top achievements
Rank 1
answered on 24 Jan 2018, 01:41 PM

You can delete this post, it was my fault. 

If you wanna keep it for future reference the code line goes like that:

 

<p>((Telerik.WinControls.Primitives.TextPrimitive)(myButton.ButtonElement.Children[1])).TextOrientation = 270;</p><p></p>

 

0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 25 Jan 2018, 12:01 PM
Hello, Maria,

Thank you for writing.  

The TextOrientation property doesn't accept numeric values but the Horizontal/Vertical options of the Orientation enum. It is not a suitable approach to use the Children collection for accessing some of the inner elements. You can directly set the RadButton.ButtonElement.TextOrientation property: 
this.radButton1.ButtonElement.TextOrientation = Orientation.Vertical;



I would recommend you to have a look at the following help article which will get you familiar with the internal structure of RadButton: https://docs.telerik.com/devtools/winforms/buttons/button/structure 

I hope this information helps. Should you have further questions I would be glad to help. 
 
 Regards,
Dess
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
Buttons, RadioButton, CheckBox, etc
Asked by
Maria
Top achievements
Rank 1
Answers by
Maria
Top achievements
Rank 1
Dess | Tech Support Engineer, Principal
Telerik team
Share this question
or