473,715 Members | 3,033 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Parent/Child Components: How to make the child components go away when deleting the Parent.

Hi All,

I'm currently writing an in-house Form validation framework (WinForms) which
is based on 'Component'-inheriting object.

So basically, I have a small hierarchy.
FormValidator
+-- ControlValidato r
+--ValidationRule

Via UITypeEditors, I got the part of managing the different
child-collections to work properly. (CollectionEdit or)
But what I don't get is how can I make the child components go away from the
form designer if you delete the 'FormValidator' component (top-leve object)
from the Form's component tray.

In other terms, I'm lookig for the same behaviour as with the
TabControl/TabPages control relationship... but not for 'Control', but rather
'Component'-based objects.

I've read a few articles, have applied some attributes
(DesignerSerial izationVisibili ty.Content) ... but I can't seem to get them
go away when you delete the top-level object.

Any help would be appreciated.

Patrick.

Nov 20 '05 #1
5 2355
Hi, Patrick

I've started the process of escalating this issue to the product team.
Please bear with us.

Thank you for choosing the MSDN Managed Newsgroups,

John Eikanger
Microsoft Developer Support

This posting is provided “AS IS” with no warranties, and confers no rights.
--------------------
| From: "Patrick Vanden Driessche" <de*******@no-spam.be>
| Subject: Parent/Child Components: How to make the child components go
away when deleting the Parent.
| Date: Thu, 13 Nov 2003 04:56:21 +0100
| Lines: 30
| X-Tomcat-NG: microsoft.publi c.dotnet.langua ges.vb
|
| Hi All,
|
| I'm currently writing an in-house Form validation framework (WinForms)
which
| is based on 'Component'-inheriting object.
|
| So basically, I have a small hierarchy.
| FormValidator
| +-- ControlValidato r
| +--ValidationRule
|
| Via UITypeEditors, I got the part of managing the different
| child-collections to work properly. (CollectionEdit or)
| But what I don't get is how can I make the child components go away from
the
| form designer if you delete the 'FormValidator' component (top-leve
object)
| from the Form's component tray.
|
| In other terms, I'm lookig for the same behaviour as with the
| TabControl/TabPages control relationship... but not for 'Control', but
rather
| 'Component'-based objects.
|
| I've read a few articles, have applied some attributes
| (DesignerSerial izationVisibili ty.Content) ... but I can't seem to get them
| go away when you delete the top-level object.
|
| Any help would be appreciated.
|
| Patrick.
|
|
|
|

Nov 20 '05 #2
Hi John,

Thank you for the follow up ....

As you can image, I kept looking for a solution on this myself too ...and I
managed to find a solution in the meantime ...

For those interested, here's what I did:
As my problem is 'Design-Time' related I created a custom
'ComponentDesig ner' class, which hooks up to the 'ComponentRemov ing' event
of the 'IComponentChan geService'.
Through this event, I can detect when the user deletes the 'parent'
component from the form designer and manually remove the 'children' from the
same form source code persistence.

Thank you.

Patrick.
""John Eikanger"" <jo****@online. microsoft.com> wrote in message
news:I$******** ******@cpmsftng xa06.phx.gbl...
Hi, Patrick

I've started the process of escalating this issue to the product team.
Please bear with us.

Thank you for choosing the MSDN Managed Newsgroups,

John Eikanger
Microsoft Developer Support

This posting is provided "AS IS" with no warranties, and confers no rights. --------------------
| From: "Patrick Vanden Driessche" <de*******@no-spam.be>
| Subject: Parent/Child Components: How to make the child components go
away when deleting the Parent.
| Date: Thu, 13 Nov 2003 04:56:21 +0100
| Lines: 30
| X-Tomcat-NG: microsoft.publi c.dotnet.langua ges.vb
|
| Hi All,
|
| I'm currently writing an in-house Form validation framework (WinForms)
which
| is based on 'Component'-inheriting object.
|
| So basically, I have a small hierarchy.
| FormValidator
| +-- ControlValidato r
| +--ValidationRule
|
| Via UITypeEditors, I got the part of managing the different
| child-collections to work properly. (CollectionEdit or)
| But what I don't get is how can I make the child components go away from
the
| form designer if you delete the 'FormValidator' component (top-leve
object)
| from the Form's component tray.
|
| In other terms, I'm lookig for the same behaviour as with the
| TabControl/TabPages control relationship... but not for 'Control', but
rather
| 'Component'-based objects.
|
| I've read a few articles, have applied some attributes
| (DesignerSerial izationVisibili ty.Content) ... but I can't seem to get them | go away when you delete the top-level object.
|
| Any help would be appreciated.
|
| Patrick.
|
|
|
|

Nov 20 '05 #3
Hi, Patrick

Thanks for sharing your solution

John Eikanger
Microsoft Developer Support

This posting is provided “AS IS” with no warranties, and confers no rights.
--------------------
| From: "Patrick Vanden Driessche" <de*******@no-spam.be>
| References: <eZ************ **@TK2MSFTNGP10 .phx.gbl>
<I$************ **@cpmsftngxa06 .phx.gbl>
| Subject: Re: Parent/Child Components: How to make the child components go
away when deleting the Parent.
| Date: Fri, 14 Nov 2003 07:43:44 +0100
| Lines: 81
| Organization: DevBrains
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| Message-ID: <#h************ **@TK2MSFTNGP09 .phx.gbl>
| Newsgroups: microsoft.publi c.dotnet.langua ges.vb
| NNTP-Posting-Host: 173.128-136-217.adsl.skynet .be 217.136.128.173
| Path: cpmsftngxa06.ph x.gbl!TK2MSFTNG P08.phx.gbl!TK2 MSFTNGP09.phx.g bl
| Xref: cpmsftngxa06.ph x.gbl microsoft.publi c.dotnet.langua ges.vb:156753
| X-Tomcat-NG: microsoft.publi c.dotnet.langua ges.vb
|
| Hi John,
|
| Thank you for the follow up ....
|
| As you can image, I kept looking for a solution on this myself too ...and
I
| managed to find a solution in the meantime ...
|
| For those interested, here's what I did:
| As my problem is 'Design-Time' related I created a custom
| 'ComponentDesig ner' class, which hooks up to the 'ComponentRemov ing' event
| of the 'IComponentChan geService'.
| Through this event, I can detect when the user deletes the 'parent'
| component from the form designer and manually remove the 'children' from
the
| same form source code persistence.
|
| Thank you.
|
| Patrick.
|
|
| ""John Eikanger"" <jo****@online. microsoft.com> wrote in message
| news:I$******** ******@cpmsftng xa06.phx.gbl...
| > Hi, Patrick
| >
| > I've started the process of escalating this issue to the product team.
| > Please bear with us.
| >
| > Thank you for choosing the MSDN Managed Newsgroups,
| >
| > John Eikanger
| > Microsoft Developer Support
| >
| > This posting is provided "AS IS" with no warranties, and confers no
| rights.
| > --------------------
| > | From: "Patrick Vanden Driessche" <de*******@no-spam.be>
| > | Subject: Parent/Child Components: How to make the child components go
| > away when deleting the Parent.
| > | Date: Thu, 13 Nov 2003 04:56:21 +0100
| > | Lines: 30
| > | X-Tomcat-NG: microsoft.publi c.dotnet.langua ges.vb
| > |
| > | Hi All,
| > |
| > | I'm currently writing an in-house Form validation framework (WinForms)
| > which
| > | is based on 'Component'-inheriting object.
| > |
| > | So basically, I have a small hierarchy.
| > | FormValidator
| > | +-- ControlValidato r
| > | +--ValidationRule
| > |
| > | Via UITypeEditors, I got the part of managing the different
| > | child-collections to work properly. (CollectionEdit or)
| > | But what I don't get is how can I make the child components go away
from
| > the
| > | form designer if you delete the 'FormValidator' component (top-leve
| > object)
| > | from the Form's component tray.
| > |
| > | In other terms, I'm lookig for the same behaviour as with the
| > | TabControl/TabPages control relationship... but not for 'Control', but
| > rather
| > | 'Component'-based objects.
| > |
| > | I've read a few articles, have applied some attributes
| > | (DesignerSerial izationVisibili ty.Content) ... but I can't seem to get
| them
| > | go away when you delete the top-level object.
| > |
| > | Any help would be appreciated.
| > |
| > | Patrick.
| > |
| > |
| > |
| > |
| >
|
|
|

Nov 20 '05 #4
John...

We're trying to find out why you and other [MSFT] accounts' replies include
the entire header of the messages you respond to. Ours don't. Look at the
size of it and what it contains... the path? MimeOLE version information?

Can't this stuff be turned off? Or how can I turn mine on we may as well
all do it.

Thanks,
Tom
""John Eikanger"" <jo****@online. microsoft.com> wrote in message
news:il******** ******@cpmsftng xa06.phx.gbl...
Hi, Patrick

Thanks for sharing your solution

John Eikanger
Microsoft Developer Support

This posting is provided "AS IS" with no warranties, and confers no rights. --------------------
| From: "Patrick Vanden Driessche" <de*******@no-spam.be>
| References: <eZ************ **@TK2MSFTNGP10 .phx.gbl>
<I$************ **@cpmsftngxa06 .phx.gbl>
| Subject: Re: Parent/Child Components: How to make the child components go away when deleting the Parent.
| Date: Fri, 14 Nov 2003 07:43:44 +0100
| Lines: 81
| Organization: DevBrains
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| Message-ID: <#h************ **@TK2MSFTNGP09 .phx.gbl>
| Newsgroups: microsoft.publi c.dotnet.langua ges.vb
| NNTP-Posting-Host: 173.128-136-217.adsl.skynet .be 217.136.128.173
| Path: cpmsftngxa06.ph x.gbl!TK2MSFTNG P08.phx.gbl!TK2 MSFTNGP09.phx.g bl
| Xref: cpmsftngxa06.ph x.gbl microsoft.publi c.dotnet.langua ges.vb:156753
| X-Tomcat-NG: microsoft.publi c.dotnet.langua ges.vb
|
| Hi John,
|
| Thank you for the follow up ....
|
| As you can image, I kept looking for a solution on this myself too ....and I
| managed to find a solution in the meantime ...
|
| For those interested, here's what I did:
| As my problem is 'Design-Time' related I created a custom
| 'ComponentDesig ner' class, which hooks up to the 'ComponentRemov ing' event | of the 'IComponentChan geService'.
| Through this event, I can detect when the user deletes the 'parent'
| component from the form designer and manually remove the 'children' from
the
| same form source code persistence.
|
| Thank you.
|
| Patrick.
|
|
| ""John Eikanger"" <jo****@online. microsoft.com> wrote in message
| news:I$******** ******@cpmsftng xa06.phx.gbl...
| > Hi, Patrick
| >
| > I've started the process of escalating this issue to the product team.
| > Please bear with us.
| >
| > Thank you for choosing the MSDN Managed Newsgroups,
| >
| > John Eikanger
| > Microsoft Developer Support
| >
| > This posting is provided "AS IS" with no warranties, and confers no
| rights.
| > --------------------
| > | From: "Patrick Vanden Driessche" <de*******@no-spam.be>
| > | Subject: Parent/Child Components: How to make the child components go | > away when deleting the Parent.
| > | Date: Thu, 13 Nov 2003 04:56:21 +0100
| > | Lines: 30
| > | X-Tomcat-NG: microsoft.publi c.dotnet.langua ges.vb
| > |
| > | Hi All,
| > |
| > | I'm currently writing an in-house Form validation framework (WinForms) | > which
| > | is based on 'Component'-inheriting object.
| > |
| > | So basically, I have a small hierarchy.
| > | FormValidator
| > | +-- ControlValidato r
| > | +--ValidationRule
| > |
| > | Via UITypeEditors, I got the part of managing the different
| > | child-collections to work properly. (CollectionEdit or)
| > | But what I don't get is how can I make the child components go away
from
| > the
| > | form designer if you delete the 'FormValidator' component (top-leve
| > object)
| > | from the Form's component tray.
| > |
| > | In other terms, I'm lookig for the same behaviour as with the
| > | TabControl/TabPages control relationship... but not for 'Control', but | > rather
| > | 'Component'-based objects.
| > |
| > | I've read a few articles, have applied some attributes
| > | (DesignerSerial izationVisibili ty.Content) ... but I can't seem to get | them
| > | go away when you delete the top-level object.
| > |
| > | Any help would be appreciated.
| > |
| > | Patrick.
| > |
| > |
| > |
| > |
| >
|
|
|

Nov 20 '05 #5
Hi, Tom

It is a limitation of our internal reader. The Tomcat reader keeps track
of a lot of extra stuff that we use internally for reporting. I trim the
excess headers out manually when I remember. If you folks find it that
irritating, I will see what it would cost to suppress them.

Let me know,

John Eikanger
Microsoft Developer Support
--------------------
| From: "Tom Leylan" <ge*@iamtiredof spam.com>
| Subject: Re: Parent/Child Components: How to make the child components go
away when deleting the Parent.
| Date: Fri, 14 Nov 2003 14:37:45 -0500
| Lines: 139
| X-Tomcat-NG: microsoft.publi c.dotnet.langua ges.vb
|
| John...
|
| We're trying to find out why you and other [MSFT] accounts' replies
include
| the entire header of the messages you respond to. Ours don't. Look at
the
| size of it and what it contains... the path? MimeOLE version information?
|
| Can't this stuff be turned off? Or how can I turn mine on we may as well
| all do it.
|
| Thanks,
| Tom
|
|
| ""John Eikanger"" <jo****@online. microsoft.com> wrote in message
| news:il******** ******@cpmsftng xa06.phx.gbl...
| > Hi, Patrick
| >
| > Thanks for sharing your solution
| >
| > John Eikanger
| > Microsoft Developer Support
| >
| > This posting is provided "AS IS" with no warranties, and confers no
| rights.
| > --------------------
| > | From: "Patrick Vanden Driessche" <de*******@no-spam.be>
| > | References: <eZ************ **@TK2MSFTNGP10 .phx.gbl>
| > <I$************ **@cpmsftngxa06 .phx.gbl>
| > | Subject: Re: Parent/Child Components: How to make the child components
| go
| > away when deleting the Parent.
| > | Date: Fri, 14 Nov 2003 07:43:44 +0100
| > | Lines: 81
| > | Organization: DevBrains
| > | X-Priority: 3
| > | X-MSMail-Priority: Normal
| > | X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| > | Message-ID: <#h************ **@TK2MSFTNGP09 .phx.gbl>
| > | Newsgroups: microsoft.publi c.dotnet.langua ges.vb
| > | NNTP-Posting-Host: 173.128-136-217.adsl.skynet .be 217.136.128.173
| > | Path: cpmsftngxa06.ph x.gbl!TK2MSFTNG P08.phx.gbl!TK2 MSFTNGP09.phx.g bl
| > | Xref: cpmsftngxa06.ph x.gbl microsoft.publi c.dotnet.langua ges.vb:156753
| > | X-Tomcat-NG: microsoft.publi c.dotnet.langua ges.vb
| > |
| > | Hi John,
| > |
| > | Thank you for the follow up ....
| > |
| > | As you can image, I kept looking for a solution on this myself too
| ...and
| > I
| > | managed to find a solution in the meantime ...
| > |
| > | For those interested, here's what I did:
| > | As my problem is 'Design-Time' related I created a custom
| > | 'ComponentDesig ner' class, which hooks up to the 'ComponentRemov ing'
| event
| > | of the 'IComponentChan geService'.
| > | Through this event, I can detect when the user deletes the 'parent'
| > | component from the form designer and manually remove the 'children'
from
| > the
| > | same form source code persistence.
| > |
| > | Thank you.
| > |
| > | Patrick.
| > |
| > |
| > | ""John Eikanger"" <jo****@online. microsoft.com> wrote in message
| > | news:I$******** ******@cpmsftng xa06.phx.gbl...
| > | > Hi, Patrick
| > | >
| > | > I've started the process of escalating this issue to the product
team.
| > | > Please bear with us.
| > | >
| > | > Thank you for choosing the MSDN Managed Newsgroups,
| > | >
| > | > John Eikanger
| > | > Microsoft Developer Support
| > | >
| > | > This posting is provided "AS IS" with no warranties, and confers no
| > | rights.
| > | > --------------------
| > | > | From: "Patrick Vanden Driessche" <de*******@no-spam.be>
| > | > | Subject: Parent/Child Components: How to make the child components
| go
| > | > away when deleting the Parent.
| > | > | Date: Thu, 13 Nov 2003 04:56:21 +0100
| > | > | Lines: 30
| > | > | X-Tomcat-NG: microsoft.publi c.dotnet.langua ges.vb
| > | > |
| > | > | Hi All,
| > | > |
| > | > | I'm currently writing an in-house Form validation framework
| (WinForms)
| > | > which
| > | > | is based on 'Component'-inheriting object.
| > | > |
| > | > | So basically, I have a small hierarchy.
| > | > | FormValidator
| > | > | +-- ControlValidato r
| > | > | +--ValidationRule
| > | > |
| > | > | Via UITypeEditors, I got the part of managing the different
| > | > | child-collections to work properly. (CollectionEdit or)
| > | > | But what I don't get is how can I make the child components go
away
| > from
| > | > the
| > | > | form designer if you delete the 'FormValidator' component
(top-leve
| > | > object)
| > | > | from the Form's component tray.
| > | > |
| > | > | In other terms, I'm lookig for the same behaviour as with the
| > | > | TabControl/TabPages control relationship... but not for 'Control',
| but
| > | > rather
| > | > | 'Component'-based objects.
| > | > |
| > | > | I've read a few articles, have applied some attributes
| > | > | (DesignerSerial izationVisibili ty.Content) ... but I can't seem to
| get
| > | them
| > | > | go away when you delete the top-level object.
| > | > |
| > | > | Any help would be appreciated.
| > | > |
| > | > | Patrick.
| > | > |
| > | > |
| > | > |
| > | > |
| > | >
| > |
| > |
| > |
| >
|
|
|

Nov 20 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

16
2669
by: Suzanne Vogel | last post by:
Hi, I've been trying to write a function to test whether one class is derived from another class. I am given only id's of the two classes. Therefore, direct use of template methods is not an option. Let's call the id of a class "cid" (for "class id"). The function signature should look like this: ******************************************
6
7963
by: Squeamz | last post by:
Hello, Say I create a class ("Child") that inherits from another class ("Parent"). Parent's destructor is not virtual. Is there a way I can prevent Parent's destructor from being called when a Child object goes out of scope? Specifically, I am dealing with a C library that provides a function that must be called to "destruct" a particular struct (this struct is dynamically allocated by another provided function). To avoid memory
13
7408
by: Stuart McGraw | last post by:
I haven't been able to figure this out and would appreciate some help... I have two tables, both with autonumber primary keys, and linked in a conventional master-child relationship. I've created forms for both those tables, and inserted the child table form into the master table form as a subform. It works just as it is supposed to, in that I can create a new master record, and then add detail records.
6
6222
by: Claus Holm | last post by:
I'm trying to enable a menuitem in the parent form from a mdichild. Rather than making the menuitems public, I'd go for a public method in the parent form to do the change, but when I call the method from the mdichild, I get this error: C:\MyProjects\Visual Studio Projects\Tournament\Forms\frmLogin.cs(69): The name 'test' does not exist in the class or namespace 'Tournament.frmLogin' frmLogin is the mdichild.
3
9701
by: Maheshkumar.R | last post by:
Hi groups, How i can command over the MDI CHIlD forms created dynamically at runtime from PARENT. Let say, i have generated 5 mdichild forms, but i want to work with child form1 from MDI parent menu functions. if i select draw line in MDI parent, the line should be drawn in current active child..any URLS for this or guide me to achieve this communication... -- Mähésh Kumär. R
6
6080
by: reandeau | last post by:
I'm building out a OO based app in PHP 5 but I'm getting a little confused on children contructing parents. I have a parent that looks like this: abstract Class State { protected $database; protected $user; protected $output; public function __construct($database,$user,$output) { $this->database = $database;
6
3987
by: Sashi | last post by:
class parent{ Parent(){}; ~Parent(){}; } Child: public Parent{ Child(){}; ~Child(){};
11
2855
by: manstey | last post by:
Hi, I am having trouble designing my classes. I have two classes. The first one wraps around an old-style class called oref Class CacheClass(object): def __init__(self, obj):
3
4307
by: Peted | last post by:
I have a simple c# app that opens a child form in a mdi parent. I want the child form to open in the center of the mdi parent, so i can open the child form ok, it all works fine, but setting frmConfig = new ConfigForm(this); frmConfig.MdiParent = this; frmConfig.TopLevel = false; frmConfig.StartPosition = FormStartPosition.CenterParent;
0
8718
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9340
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9103
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9047
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7973
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6646
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4477
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4738
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2539
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.