Article View: borland.public.cppbuilder.nativeapi
Article #549Re: Create VCL Control from within an Object
From: JohnC
Date: Thu, 31 Jan 2008 20:23
Date: Thu, 31 Jan 2008 20:23
32 lines
2174 bytes
2174 bytes
"Asger Joergensen" <junk@Asger-P.dk> wrote in message news:MPG.220c37f435e9dd16989a27@newsgroups.borland.com... > You should not use FormCreate when You are working with > BCB, it is a Delphi Event. This one confuses me. Why do you say it is a Delphi event? I've been using it for years with C++ code. > Use the constructor instead. How would one use the constructor except through a hook? FormCreate is just a hook (into the constructor, I believe). > To be able to use the designer You could also build everything > on a panel at design time and then just make it invisible when > You don't need it. I've used this trick to avoid crowded forms. I agree, it can be very useful. The mess I'm trying to avoid is in the code. What I'm doing is extracting things into objects which will allow me to have cleaner code for the main form and which will allow me to reuse the composite controls in other similar or related applications. I've got it working now - what I needed was to explicitely set the Parent - I had thought that it was enough to include it in the constructor call. > Kind regards > Asger Thanks, John
Technical Details
Message-ID:
<47a22e26$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<47a1c92f$1@newsgroups.borland.com> <MPG.220bf5123600e831989a26@newsgroups.borland.com> <47a1e5d8$1@newsgroups.borland.com> <MPG.220c37f435e9dd16989a27@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,15058af8c1208ee6 X-Google-Attributes: gid10cc67,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit From: "JohnC" <jcibulskis@sbcglobal.net> Newsgroups: borland.public.cppbuilder.nativeapi References: <47a1c92f$1@newsgroups.borland.com> <MPG.220bf5123600e831989a26@newsgroups.borland.com> <47a1e5d8$1@newsgroups.borland.com> <MPG.220c37f435e9dd16989a27@newsgroups.borland.com> Subject: Re: Create VCL Control from within an Object Date: Thu, 31 Jan 2008 14:23:03 -0600 Lines: 34 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.3138 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198 X-RFC2646: Format=Flowed; Original NNTP-Posting-Host: 76.224.12.255 Message-ID: <47a22e26$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1201810982 76.224.12.255 (31 Jan 2008 12:23:02 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail