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

CollapsiblePanel rectangle button instead of round?

4 Answers 64 Views
CollapsiblePanel
This is a migrated thread and some comments may be shown as answers.
Mark
Top achievements
Rank 2
Bronze
Iron
Veteran
Mark asked on 19 Jun 2017, 02:19 PM

Is there a way to change the button on the collapsible panel from a round button to a rectangle?  I would have TEXT in the button instead of a UP/DOWN arrow?

 

TIA

4 Answers, 1 is accepted

Sort by
0
Dimitar
Telerik team
answered on 20 Jun 2017, 06:54 AM
Hello Mark,

The following snippet shows how you can achieve the desired style:
radCollapsiblePanel1.CollapsiblePanelElement.HeaderElement.HeaderButtonElement.Shape = new RoundRectShape(2);
radCollapsiblePanel1.CollapsiblePanelElement.HeaderElement.HeaderButtonElement.Text = "Test";
radCollapsiblePanel1.CollapsiblePanelElement.HeaderElement.HeaderButtonElement.Image = null;
radCollapsiblePanel1.CollapsiblePanelElement.HeaderElement.HeaderButtonElement.MinSize = new Size(50, 22);

Please let me know if there is something else I can help you with. 

Regards,
Dimitar
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Mark
Top achievements
Rank 2
Bronze
Iron
Veteran
answered on 20 Jun 2017, 12:52 PM

This is great. I was trying to do it via the Element hierarchy editor, which I have done, except I want the button to have right angle corners and not rounded.  I tried changing the "Shape" (CollapsiblePandelButtonElement) property's BottomLeftRounded, BottomRightRounded, etc to FALSE, but that still left the button with round corners.

0
Accepted
Dimitar
Telerik team
answered on 20 Jun 2017, 01:16 PM
Hello Mark,

Set the radius to 0 when creating the shape:
radCollapsiblePanel1.CollapsiblePanelElement.HeaderElement.HeaderButtonElement.Shape = new RoundRectShape(0);

Do not hesitate to contact us if you have other questions.
 
Regards,
Dimitar
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Mark
Top achievements
Rank 2
Bronze
Iron
Veteran
answered on 20 Jun 2017, 01:38 PM
Thanks for the help, found it in the Element hierarchy editor as I got your e-mail :)
Tags
CollapsiblePanel
Asked by
Mark
Top achievements
Rank 2
Bronze
Iron
Veteran
Answers by
Dimitar
Telerik team
Mark
Top achievements
Rank 2
Bronze
Iron
Veteran
Share this question
or