CollapsiblePanel rectangle button instead of round?

5 posts, 1 answers
  1. Mark
    Mark avatar
    66 posts
    Member since:
    Oct 2014

    Posted 19 Jun Link to this post

    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

  2. Dimitar
    Admin
    Dimitar avatar
    1871 posts

    Posted 20 Jun Link to this post

    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.
  3. Mark
    Mark avatar
    66 posts
    Member since:
    Oct 2014

    Posted 20 Jun Link to this post

    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.

  4. Answer
    Dimitar
    Admin
    Dimitar avatar
    1871 posts

    Posted 20 Jun Link to this post

    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.
  5. Mark
    Mark avatar
    66 posts
    Member since:
    Oct 2014

    Posted 20 Jun in reply to Dimitar Link to this post

    Thanks for the help, found it in the Element hierarchy editor as I got your e-mail :)
Back to Top