🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.pascal.delphi.components.writing
Article #32

Re: creating components within components

#32
From: Roel Spapens
Date: Thu, 08 Oct 1998 00:00
34 lines
1836 bytes
for the captionlabel you should do something like
OnCreate
begin
  captionlabel:=Tlabel.Create(Self);
  captionlabel.parent:=Self;
  captionlabel.visible:=true;
  // set it's position
end;

for other components about the same applies.

HTH

  Roel


In comp.lang.pascal.delphi.misc Greg Lubel <"<NOSPAM> wrote:
> I want to create a TCustomControl (a coloured circle) with a caption and
> an image area. (Delphi 3 Pro)

> I have created the TCustomControl and I've tried adding a create
> 'CaptionLabel:Tlabel', firstly in the create method and then in the
> paint method of my CustomControl. I have managed to compile both these
> attempts but neither render the label when I instantiate a CustomControl
> at run time. Firstly, is this the correct way to approach this? If it
> is, what do I use as 'parent' for the CaptionLabel. Will the same
> solution apply to an 'IconImage:TBitmap' or any other embellishments? If
> possible I'd really appreciate a small but fully worked example or if
> not, then the key points.

> Thanks,


> Greg
Technical Details
Message-ID: <6vj5a8$c33@tuegate.tue.nl>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <361CAD6C.BC9D4681@uk.ibm.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10baee,f2b6d00efe3f36de
X-Google-Attributes: gid10baee,public
X-Google-Thread: fe2ce,f2b6d00efe3f36de
X-Google-Attributes: gidfe2ce,public
X-Google-Thread: 112b07,f2b6d00efe3f36de
X-Google-Attributes: gid112b07,public
From: Roel Spapens <roels@stack.nl>
Subject: Re: creating components within components
Date: 1998/10/08
Message-ID: <6vj5a8$c33@tuegate.tue.nl>
X-Deja-AN: 399109135
References: <361CAD6C.BC9D4681@uk.ibm.com>
Organization: Eindhoven University of Technology, The Netherlands
User-Agent: tin/pre-1.4-980730 (UNIX) (FreeBSD/2.2.7-STABLE (i386))
Newsgroups: comp.lang.pascal.delphi.components.writing,comp.lang.pascal.delphi.misc,borland.public.delphi.vcl.components.writing