Article View: comp.lang.pascal.delphi.components.writing
Article #29Re: Removing Components
From: Robert O'Dowd
Date: Mon, 30 Nov 1998 00:00
Date: Mon, 30 Nov 1998 00:00
25 lines
1993 bytes
1993 bytes
Solid wrote: > > Does anyone know how I can remove a component from a form at runtime. > Right now I have it as looping through the component count and then > using the property free to remove it. Is there a better way? > Depends on whether you specifically need to destroy the object (e.g. to clean up allocated memory), or just have the user think it's disappeared. If the latter, just disable it and/or make it invisible. This has the advantage that you can conveniently make it reappear. There are properties for enabling, disabling, or setting visibility for most visual components. -<Automagically included trailer> Robert O'Dowd Ph +61 (8) 9553 3618 DSTO Bldg A51 Fax +61 (8) 9553 3577 HMAS Stirling Email: robert.odowd@dsto.defence.gov.au Rockingham, Western Australia, 6958 Disclaimer: Opinions above are mine and may be worth what you paid for them
Technical Details
Message-ID:
<36620B9A.9F140935@nonexistant.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<36616C4A.3E825C2@bellsouth.net>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 108890,1aa9e3e31397d539 X-Google-Attributes: gid108890,public X-Google-Thread: fb0ea,1aa9e3e31397d539 X-Google-Attributes: gidfb0ea,public X-Google-Thread: fe2ce,1aa9e3e31397d539 X-Google-Attributes: gidfe2ce,public X-Google-Thread: 112b07,1aa9e3e31397d539 X-Google-Attributes: gid112b07,public X-Google-Thread: 109d99,1aa9e3e31397d539 X-Google-Attributes: gid109d99,public From: Robert O'Dowd <nospam@nonexistant.com> Subject: Re: Removing Components Date: 1998/11/30 Message-ID: <36620B9A.9F140935@nonexistant.com> X-Deja-AN: 416959359 Content-Transfer-Encoding: 7bit References: <36616C4A.3E825C2@bellsouth.net> Content-Type: text/plain; charset=us-ascii Organization: Defence Science & Technology Organisation Mime-Version: 1.0 Newsgroups: comp.lang.pascal.delphi.components.writing,borland.public.delphi.vcl.components.writing,borland.public.delphi.vcl.components.using,comp.lang.pascal.delphi.components,comp.lang.pascal.delphi.components.misc