Re: Equivalent to VCL's DataModule
- From: Edward Diener <eddielee_no_spam_here@xxxxxxxxxxxxxx>
- Date: Tue, 28 Mar 2006 17:32:46 -0500
Clive Dixon wrote:
Does the IDE know to look for a private variable of type System.ComponentModel.Container in a CLR object in order to have that object act as a container for other objects at design time ? If not, what is the criteria by which an object at design time can act as a visual container of other objects ?
You can add components to a form or component class even if it doesn't have a container object (try deleting the container object from your wizard generated form or component class and then add components). It's just that if the component you add has a constructor taking IContainer, then VS will add that component to the container object that was created by the wizard - otherwise VS won't add it to the container.
I would assume ever GUI class must have a constructor taking IContainer, else it could not be added to a form, yet when I drop a GUI object onto my component class no code is generated which adds the GUI object to my component class's private container.
I suspect VS's sole criterion for displaying a designer page for a class is that the class derives either from Form or Component, though I don't know for sure.
Since Form derived from Component, perhaps the criterion is that a designer page for a class is displayed if that class is a component or derived from a component.
.
- References:
- Equivalent to VCL's DataModule
- From: Edward Diener
- Re: Equivalent to VCL's DataModule
- From: Clive Dixon
- Re: Equivalent to VCL's DataModule
- From: Edward Diener
- Re: Equivalent to VCL's DataModule
- From: Stephany Young
- Re: Equivalent to VCL's DataModule
- From: Edward Diener
- Re: Equivalent to VCL's DataModule
- From: Clive Dixon
- Re: Equivalent to VCL's DataModule
- From: Clive Dixon
- Re: Equivalent to VCL's DataModule
- From: Edward Diener
- Re: Equivalent to VCL's DataModule
- From: Clive Dixon
- Equivalent to VCL's DataModule
- Prev by Date: Re: VS2005 Clipboard ring
- Next by Date: Hot to find Microsoft.ApplicationBlocks.Cache.dll
- Previous by thread: Re: Equivalent to VCL's DataModule
- Next by thread: Re: Equivalent to VCL's DataModule
- Index(es):
Relevant Pages
|