HOWTO: Make a container control?

A

Alejandro Lapeyre

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

Best Regards,
Alejandro Lapeyre
 
P

Patrice

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

Patrice
 
A

Alejandro Lapeyre

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

Thanks.

Best Regards,
Alejandro Lapeyre
 
A

Alejandro Lapeyre

If I inherit from UserControl I cannot add controls to my UserControl at
design time.



Best Regards,
Alejandro Lapeyre
 
C

Claudio Grazioli

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.
 
A

Alejandro Lapeyre

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
 
A

Alejandro Lapeyre

THANKS!

The ParentControlDesigner Class looks promising.



Best Regards,
Alejandro Lapeyre
 
R

Richard L Rosenheim

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
 
A

Alejandro Lapeyre

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top