469,275 Members | 1,594 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,275 developers. It's quick & easy.

HOWTO: Make a container control?

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

Best Regards,
Alejandro Lapeyre
Jul 21 '05 #1
11 7373
"Container" is a bit vague. If you are talking about naming containers, they
are created by using the INamingContainer marker interface...

Patrice

--

"Alejandro Lapeyre" <Al**************@jotmail.com> a écrit dans le message
de news:er**************@TK2MSFTNGP14.phx.gbl...
How can I make a control that acts like a container control (besides from
inheriting from panel) ?

Best Regards,
Alejandro Lapeyre

Jul 21 '05 #2
Well, I mean a Form Control that I can add children Controls to. Like the
Panel Control.

Thanks.

Best Regards,
Alejandro Lapeyre
"Patrice" <no****@nowhere.com> escribió en el mensaje
news:%2***************@TK2MSFTNGP09.phx.gbl...
"Container" is a bit vague. If you are talking about naming containers,
they
are created by using the INamingContainer marker interface...

Patrice

--

"Alejandro Lapeyre" <Al**************@jotmail.com> a écrit dans le message
de news:er**************@TK2MSFTNGP14.phx.gbl...
How can I make a control that acts like a container control (besides from
inheriting from panel) ?

Best Regards,
Alejandro Lapeyre


Jul 21 '05 #3
On Wed, 30 Mar 2005 09:34:23 -0300, Alejandro Lapeyre wrote:
Well, I mean a Form Control that I can add children Controls to. Like the
Panel Control.


Than you have to create a UserControl.

Here http://visualbasic.about.com/od/usin.../aa082503a.htm you can
find a short tutorial (in VB.NET).

hth

--
Claudio Grazioli
http://www.grazioli.ch
Jul 21 '05 #4
This collection is inherited from System.Windows.Forms.Control. All controls
should have this one.
http://msdn.microsoft.com/library/de...trolstopic.asp

Try also :
http://samples.gotdotnet.com/quickst...gControls.aspx

I believe you are after the "User Controls" sample... (my understanding is
that you would like to combine several existing controls in your own control
?).

Patrice

--

"Alejandro Lapeyre" <Al**************@jotmail.com> a écrit dans le message
de news:ev**************@TK2MSFTNGP14.phx.gbl...
Well, I mean a Form Control that I can add children Controls to. Like the
Panel Control.

Thanks.

Best Regards,
Alejandro Lapeyre
"Patrice" <no****@nowhere.com> escribió en el mensaje
news:%2***************@TK2MSFTNGP09.phx.gbl...
"Container" is a bit vague. If you are talking about naming containers,
they
are created by using the INamingContainer marker interface...

Patrice

--

"Alejandro Lapeyre" <Al**************@jotmail.com> a écrit dans le message de news:er**************@TK2MSFTNGP14.phx.gbl...
How can I make a control that acts like a container control (besides from inheriting from panel) ?

Best Regards,
Alejandro Lapeyre



Jul 21 '05 #5
If I inherit from UserControl I cannot add controls to my UserControl at
design time.

Best Regards,
Alejandro Lapeyre
Jul 21 '05 #6
On Wed, 30 Mar 2005 12:09:31 -0300, Alejandro Lapeyre wrote:
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.
--
Claudio Grazioli
http://www.grazioli.ch
Jul 21 '05 #7
Was starting to suspect something similar....

This is likely done with "designers". See around :
http://msdn.microsoft.com/library/de...omdesigner.asp

And in particular this one :
http://msdn.microsoft.com/library/de...classtopic.asp

Good luck.
Patrice

--

"Alejandro Lapeyre" <Al**************@jotmail.com> a écrit dans le message
de news:uk**************@TK2MSFTNGP15.phx.gbl...
If I inherit from UserControl I cannot add controls to my UserControl at
design time.

Best Regards,
Alejandro Lapeyre

Jul 21 '05 #8
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

"Claudio Grazioli" <ne********@gmx-ist-cool.de> escribió en el mensaje
news:16*****************************@40tude.net...
On Wed, 30 Mar 2005 12:09:31 -0300, Alejandro Lapeyre wrote:
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.
--
Claudio Grazioli
http://www.grazioli.ch

Jul 21 '05 #9
THANKS!

The ParentControlDesigner Class looks promising.

Best Regards,
Alejandro Lapeyre

"Patrice" <no****@nowhere.com> escribió en el mensaje
news:uc****************@TK2MSFTNGP12.phx.gbl...
Was starting to suspect something similar....

This is likely done with "designers". See around :
http://msdn.microsoft.com/library/de...omdesigner.asp

And in particular this one :
http://msdn.microsoft.com/library/de...classtopic.asp

Good luck.
Patrice

--

"Alejandro Lapeyre" <Al**************@jotmail.com> a écrit dans le message
de news:uk**************@TK2MSFTNGP15.phx.gbl...
If I inherit from UserControl I cannot add controls to my UserControl at
design time.

Best Regards,
Alejandro Lapeyre


Jul 21 '05 #10
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.ParentContr olDesigner,
System.Design", _
GetType(Design.IDesigner))> _

Richard Rosenheim
"Alejandro Lapeyre" <Al**************@jotmail.com> wrote in message
news:uk**************@TK2MSFTNGP15.phx.gbl...
If I inherit from UserControl I cannot add controls to my UserControl at
design time.

Best Regards,
Alejandro Lapeyre

Jul 21 '05 #11
THANKS!

Best Regards
Alejandro Lapeyre

"Richard L Rosenheim" <ri*****@rlr.com> escribió en el mensaje
news:OV**************@TK2MSFTNGP14.phx.gbl...
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.ParentContr olDesigner,
System.Design", _
GetType(Design.IDesigner))> _

Richard Rosenheim
"Alejandro Lapeyre" <Al**************@jotmail.com> wrote in message
news:uk**************@TK2MSFTNGP15.phx.gbl...
If I inherit from UserControl I cannot add controls to my UserControl at
design time.

Best Regards,
Alejandro Lapeyre


Jul 21 '05 #12

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Ken Seier | last post: by
reply views Thread by pepsi | last post: by
11 posts views Thread by Alejandro Lapeyre | last post: by
reply views Thread by Michael Dawson | last post: by
reply views Thread by PJ6 | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.