VS 2005 Custom Control - With Custom Designer
Hello,
I am trying to create a custom control that for all intents and purposes is a panel control with a header bar and a button in the header. The problem I am having is that I can't seem to create a control that will child other controls during design time.
So basically I create a user control that contains a panel. I then import that control and place it on a form in another project. Then I try to put a Button let's say, into the custom panel control. This doesn't work.
I remember that in VS 2003 you had to write special designer code. Though be it quite complicated, I could atleast find something on the net. I have yet to find any good tutorial or documentation, online or in the help files regarding this.
Thanks,
Christian
Re: VS 2005 Custom Control - With Custom Designer
Try following the XPCC link in my signature. I think that there may be some information at that site about doing what you're asking about.
Re: VS 2005 Custom Control - With Custom Designer
Re: VS 2005 Custom Control - With Custom Designer
What I have done in the past is inherit the panel control, then override the paint event to draw what I wanted to change about the panel control using GDI. DOing it that way I have no issues adding controls to the panel.
Re: VS 2005 Custom Control - With Custom Designer
You add the controls at design time?
Re: VS 2005 Custom Control - With Custom Designer
Re: VS 2005 Custom Control - With Custom Designer
I'll give that a try, thanks.