HOWTO: Make a container control?

  • Thread starter Thread starter Alejandro Lapeyre
  • Start date Start date
A

Alejandro Lapeyre

How can I make a control that acts like a container control (besides from
inheriting from panel) ?

Best Regards,
Alejandro Lapeyre
 
"Container" is a bit vague. If you are talking about naming containers, they
are created by using the INamingContainer marker interface...

Patrice
 
Well, I mean a Form Control that I can add children Controls to. Like the
Panel Control.

Thanks.

Best Regards,
Alejandro Lapeyre
 
If I inherit from UserControl I cannot add controls to my UserControl at
design time.



Best Regards,
Alejandro Lapeyre
 
If I inherit from UserControl I cannot add controls to my UserControl at
design time.

Best Regards,
Alejandro Lapeyre

So what's wrong with the panel control then?

I think you could create a UserControl and implement your own designer
support.

I recommend to look at the XPCC controls library
(http://www.steepvalley.net/dev/projects.aspx).

It's open source and there is a TaskPane control that I think does exactly
what you want. It's kind of a panel, but inherited from UserControl and
supports design time.
 
What I want to do is a Control similar to the Tab control. but without tabs.

I want to use it for Wizard like forms.

Thanks for the input, I will check your postings.

Best Regards,
Alejandro Lapeyre
 
THANKS!

The ParentControlDesigner Class looks promising.



Best Regards,
Alejandro Lapeyre
 
To enable container support for an user control, you need to import
System.ComponentModel and System.ComponentModel.Design and add the following
line before the "Public Class" statement:

<Designer("System.Windows.Forms.Design.ParentControlDesigner,
System.Design", _
GetType(Design.IDesigner))> _

Richard Rosenheim
 
THANKS!

Best Regards
Alejandro Lapeyre

Richard L Rosenheim said:
To enable container support for an user control, you need to import
System.ComponentModel and System.ComponentModel.Design and add the
following
line before the "Public Class" statement:

<Designer("System.Windows.Forms.Design.ParentControlDesigner,
System.Design", _
GetType(Design.IDesigner))> _

Richard Rosenheim
 
Back
Top