Can RadPanel only have bottom border (or top etc)?

6 posts, 1 answers
  1. Josh
    Josh avatar
    23 posts
    Member since:
    Feb 2011

    Posted 15 Feb 2011 Link to this post

    Hey all,

    I can't seem to find a way to get the panel to only have a bottom border. It's probably pretty obvious but everything I'm trying isn't working.

    So far I've gone into the smart tag for the panel control and messed around with the 'width' property of the various borders under the layout and box area's of the properties. I've done this with both the UI.RadPanelElement and BorderPrimitive areas. I'm setting the width on the side I don't want to show to 0 and that's not working. I've also tried -1 as well as changing the BorderThickness to no avail.

    Appreciate any help with this!
  2. Answer
    Richard Slade
    Richard Slade avatar
    3000 posts
    Member since:
    May 2009

    Posted 15 Feb 2011 Link to this post

    Hi Josh,

    In order to control each border, you first need to set the box style of the border. You can then change the border thickness for each

    Me.RadPanel1.PanelElement.PanelBorder.BoxStyle = BorderBoxStyle.FourBorders 
    Me.RadPanel1.PanelElement.PanelBorder.TopWidth = 0

    Have a look at this link which explains the border primitive that will explain all this in detail.
    Hope that helps
    Richard
  3. Josh
    Josh avatar
    23 posts
    Member since:
    Feb 2011

    Posted 15 Feb 2011 Link to this post

    Hey Richard,

    Thanks buddy, that did the trick! I just needed to set the BoxStyle = FourBorders. Once again, you're the man!

    Best Regards,
    Josh
  4. Richard Slade
    Richard Slade avatar
    3000 posts
    Member since:
    May 2009

    Posted 15 Feb 2011 Link to this post

    You're welcome!
  5. Malleswari
    Malleswari avatar
    1 posts
    Member since:
    May 2020

    Posted 26 May Link to this post

    Can RadTextBox have only bottom border? As of now I am using a rad Panel(short height) below the rad Textbox to get the bottom line. 
  6. Nadya
    Admin
    Nadya avatar
    249 posts

    Posted 27 May Link to this post

    Hello Malleswari,

    If you want to have only the bottom border in RadTextBox you should set the BorderBoxStyle.FourBorders and manage the width of each border in order to achieve your custom requirement:

    this.radTextBox1.TextBoxElement.Border.BoxStyle = BorderBoxStyle.FourBorders;
    this.radTextBox1.TextBoxElement.Border.LeftWidth = 0;
    this.radTextBox1.TextBoxElement.Border.RightWidth = 0;
    this.radTextBox1.TextBoxElement.Border.TopWidth = 0;
    

    Do not hesitate to contact me if you have other questions.

    Regards,
    Nadya
    Progress Telerik

    Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
    Our thoughts here at Progress are with those affected by the outbreak.
Back to Top