473,405 Members | 2,310 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

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 7674
"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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Ken Seier | last post by:
Hello, I'm trying to create a fairly standard custom container control by using the ScrollableControlDesigner attribute. My control has a title bar at the top, and I would like to exclude the...
0
by: pepsi | last post by:
Hello, I would suggest a simple div tag... you could assign it a id and runat server. It should work. pepsi >-----Original Message----- >Hi gang. I tried posting this under a different...
11
by: Alejandro Lapeyre | last post by:
How can I make a control that acts like a container control (besides from inheriting from panel) ? Best Regards, Alejandro Lapeyre
0
by: Michael Dawson | last post by:
I am wanting to create a container control like the .net library's Panel control, but i don't know how to implement something like this. I needs one that has a label on the left hand side and the...
0
by: brosembob | last post by:
Hello there, I'm writing a plugin Dll (C#) to be used with application written in unmanaged C++. The plugin has an interface function that the unmanaged application is calling. One of the passed...
1
by: mnuckols | last post by:
I am trying to create a custom container control for Windows Forms using C#.NET 2.0. My problem is that I want only part of the control to allow other controls to be placed on it at design time. ...
0
by: PJ6 | last post by:
Does anyone know of a good, simple example of a custom server-side (2.0) container control, where you can drag drop other controls into an editable region, and what you see at design time is what...
5
by: gerry | last post by:
I am trying to create a custom container control that will only ever contain a specific type of control. At design time, when a control of a different type is added to the container I would like...
1
GaryTexmo
by: GaryTexmo | last post by:
In my last insight, http://bytes.com/topic/c-sharp/insights/909141-object-scaling-varying-resolutions, I talked about scaling objects to a form's size so that it would always draw with the correct...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.