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

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

10 Answers 440 Views
ShapedForm
This is a migrated thread and some comments may be shown as answers.
john
Top achievements
Rank 1
john asked on 03 Jul 2007, 09:13 PM
i'm sure this is an easy one, but i can't get it to work in design or runtime.

thanks...

10 Answers, 1 is accepted

Sort by
0
john
Top achievements
Rank 1
answered on 03 Jul 2007, 09:55 PM
oh geesh...nevermind.  pilot error on my part.


0
Mike
Telerik team
answered on 04 Jul 2007, 06:52 AM
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
0
john
Top achievements
Rank 1
answered on 06 Jul 2007, 03:28 PM
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....

0
Jack
Telerik team
answered on 09 Jul 2007, 10:30 AM
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
0
john
Top achievements
Rank 1
answered on 09 Jul 2007, 04:40 PM
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.
0
Mike
Telerik team
answered on 10 Jul 2007, 07:54 AM
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
0
john
Top achievements
Rank 1
answered on 10 Jul 2007, 04:35 PM
thanks guys.  the padding piece is what i was missing.  all is well.
0
Zsolt
Top achievements
Rank 1
answered on 02 Aug 2007, 11:14 AM
Hi,

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

Thanks
0
Mike
Telerik team
answered on 02 Aug 2007, 02:07 PM
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
0
joshuarivers
Top achievements
Rank 2
answered on 09 Feb 2008, 12:24 AM
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.
Tags
ShapedForm
Asked by
john
Top achievements
Rank 1
Answers by
john
Top achievements
Rank 1
Mike
Telerik team
Jack
Telerik team
Zsolt
Top achievements
Rank 1
joshuarivers
Top achievements
Rank 2
Share this question
or