Article View: borland.public.csharpbuilder.language.csharp
Article #349Re: Component inheritance
From: Pavel Pavlov
Date: Wed, 07 Sep 2005 07:56
Date: Wed, 07 Sep 2005 07:56
28 lines
2266 bytes
2266 bytes
Marc Rohloff [TeamB] napisaΕ(a): > On 6 Sep 2005 08:30:03 -0700, Craig Stuntz [TeamB] wrote: > > >>>If I drop some components on MyParentComponent, I can't see them in >>>MyChildComponent (which descends from MyParentComponent). > > >> This seems to be an issue with the WinForms designer. A lot of people >>have reported it; it happens in Visual Studio also. I am unaware of a >>fix at present. > > > The designer needs to be able to instantiate the base component so it > a) needs to be compiled and b) needs a public, parameterless > constructor. > The base component follows both a) and b) rules and the designer instantiates it. The only problem is that (with MyChildComponent opened in the designer) the designer shows only components dropped at MyChildComponent, hiding components dropped at MyParentComponent. BTW the fact that the designer needs to be able to instantiate the base component forces the developer to turn abstract methods into virtual. It could be smarter here too. There are more issues connected with this "blind" instantiation of the base component, but let's focus on the thread's title.
Technical Details
Message-ID:
<431e9b61$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!newsfeed.hal-mli.net!feeder1.hal-mli.net!news.moat.net!news-out.newsfeeds.com!propagator3-LAX.newsfeeds.com!news-in.newsfeeds.com!news-in.superfeed.net!caladan.landsraad.net!newsgroups.borland.com!not-for-mailReferences:
<431975fd@newsgroups.borland.com> <431db5fb$1@newsgroups.borland.com> <1uh525wrdlg2x$.dlg@marcrohloff.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 1efe35,a5d6168ce5400319 X-Google-Attributes: gid1efe35,public X-Google-Language: ENGLISH,UTF8 Date: Wed, 07 Sep 2005 09:56:18 +0200 From: Pavel Pavlov <pp@p3studio.pl> User-Agent: Mozilla Thunderbird 1.0.6 (Windows/20050716) X-Accept-Language: pl, en-us, en MIME-Version: 1.0 Newsgroups: borland.public.csharpbuilder.language.csharp Subject: Re: Component inheritance References: <431975fd@newsgroups.borland.com> <431db5fb$1@newsgroups.borland.com> <1uh525wrdlg2x$.dlg@marcrohloff.com> In-Reply-To: <1uh525wrdlg2x$.dlg@marcrohloff.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit NNTP-Posting-Host: 83.17.105.154 Message-ID: <431e9b61$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1126079329 83.17.105.154 (7 Sep 2005 00:48:49 -0700) Lines: 28 Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!newsfeed.hal-mli.net!feeder1.hal-mli.net!news.moat.net!news-out.newsfeeds.com!propagator3-LAX.newsfeeds.com!news-in.newsfeeds.com!news-in.superfeed.net!caladan.landsraad.net!newsgroups.borland.com!not-for-mail