How can I set the BorderWidth and BorderColor on a ShapedForm?

11 posts, 0 answers
  1. john
    john avatar
    13 posts
    Member since:
    Jun 2007

    Posted 03 Jul 2007 Link to this post

    i'm sure this is an easy one, but i can't get it to work in design or runtime.

    thanks...
  2. john
    john avatar
    13 posts
    Member since:
    Jun 2007

    Posted 03 Jul 2007 Link to this post

    oh geesh...nevermind.  pilot error on my part.


  3. UI for WinForms is Visual Studio 2017 Ready
  4. Mike
    Admin
    Mike avatar
    640 posts

    Posted 04 Jul 2007 Link to this post

    Hello john,

    We are glad that you have succeeded in solving this one. Here are also some other resources and forum threads where we discuss ShapedForm, that you might find interesting:
    http://www.telerik.com/support/kb/article/b454K-ttk-b454T-ckd-b454c-ckd.aspx
    http://www.telerik.com/community/forums/thread/b311D-gmtgg.aspx

    Best wishes,
    Mike
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  5. john
    john avatar
    13 posts
    Member since:
    Jun 2007

    Posted 06 Jul 2007 Link to this post

    hey guys, sorry to be a pian in the butt.  i had figured out the border width and color in relation to a shaped form; however, if i have a titlebar or ribbonbar, i can't get the border (color, width) to extend around them as well. it stops at the the top of the form edge and the bottom edge of the titlebar or ribbonbar, etc....

    thanks guys....

  6. Jack
    Admin
    Jack avatar
    2335 posts

    Posted 09 Jul 2007 Link to this post

    Hi John,

    The ShapedForm treats all space as a client area. So when a RadTitleBar is docked on top, it hides the border. One possible solution is to drop a Panel on the form and anchor it to each side of the form. This panel will serve as the client area. You can then place all your controls inside the panel.

     
    Kind regards,
    Jack
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  7. john
    john avatar
    13 posts
    Member since:
    Jun 2007

    Posted 09 Jul 2007 Link to this post

    once i do as you describe, i lose part of the ribbonbar.  aside form the anchors, is the panel docked, or just stretched out to the edges of the form?

    if i dock it, i lose the border edges, if i stretch it, i lose the ribbonbar.
  8. Mike
    Admin
    Mike avatar
    640 posts

    Posted 10 Jul 2007 Link to this post

    Hello john,

    You can dock the panel, and since it should not  clip the border, you should set forms' padding to let's say (2,2,2,2)
    In this case you should have mind that you should set both  BackColor and BorderColor of the shape form to make it look consistent around the edges. I've prepared an app that demonstrates this approach, using RadPanel, RadRibbonBar and ShapedForm.
     
    Kind regards,
    Mike
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  9. john
    john avatar
    13 posts
    Member since:
    Jun 2007

    Posted 10 Jul 2007 Link to this post

    thanks guys.  the padding piece is what i was missing.  all is well.
  10. Zsolt
    Zsolt avatar
    16 posts
    Member since:
    Jan 2007

    Posted 02 Aug 2007 Link to this post

    Hi,

    Will this be fixed/changed in the SP2? I mean not to require the RadPanel to get the borders right.

    Thanks
  11. Mike
    Admin
    Mike avatar
    640 posts

    Posted 02 Aug 2007 Link to this post

    Hi Zsolt,

    Actually the border problem can be solved using paddings. It is not necessary to use RadPanel or any other panel in this case. And yes: we do plan to improve this functionality in a way that is more intuitive for use. It is very important for us if you can share you requirements on how would you expect this feature to work.

    Kind regards,
    Mike
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  12. joshuarivers
    joshuarivers avatar
    21 posts
    Member since:
    Jul 2007

    Posted 08 Feb 2008 Link to this post

    I just want to bump this thread, since it solved the problem I was having.

    To re-iterate:
    If you are using shaped form,
    and have a docked control in your form,
    and your border has disappeared:
    Set the padding on the form itself to 2 (or your border width)
    and your border will re-appear.

    Thanks for the help, guys.
Back to Top
UI for WinForms is Visual Studio 2017 Ready