Thanks all, freeing the panels worked..

Chris <[EMAIL PROTECTED]> wrote:  hmm dangerous; this will free ALL components 
in the group box - if you
want ONLY panels as the is clause

> procedure TForm1.btnDestroyClick(Sender: TObject);
> var
>   i:integer;
> begin
>   for i:= GroupBox1.ControlCount -1 downto 0 do
>     if GroupBox1.Controls[1] is TPanel then //or whatever it is
        GroupBox1.Controls[i].Free;
> 
> end;

freeing a panel automatically frees the "owned" components (if created by
the rules)

-----Original Message-----
From: logman0u812 <[EMAIL PROTECTED]>
To: [email protected]
Date: Fri, 17 Mar 2006 08:39:17 -0800 (PST)
Subject: Re: [delphi-en] Destroying dynamically created panels in a groupbox

> Just make sure you increment backwards.
> Hope this helps...
> 
> procedure TForm1.btnDestroyClick(Sender: TObject);
> var
>   i:integer;
> begin
>   for i:= GroupBox1.ControlCount -1 downto 0 do
>     GroupBox1.Controls[i].Free;
> 
> end;
> 
> Rob Kennedy <[EMAIL PROTECTED]> wrote:     Curtis cloud wrote:
>  > How do you delete dynamically created panels in a group box?
>  
>  Free them.
>  
>  -- 
>  Rob
>       
>             
> ---------------------------------
> Yahoo! Mail
> Bring photos to life! New PhotoMail  makes sharing a breeze. 
> 
> [Non-text portions of this message have been removed]
> 
> 
> 
> -----------------------------------------------------
> Home page: http://groups.yahoo.com/group/delphi-en/
> To unsubscribe: [EMAIL PROTECTED] 
> Yahoo! Groups Links
> 
> 
> 
>  
> 
> 




-----------------------------------------------------
Home page: http://groups.yahoo.com/group/delphi-en/
To unsubscribe: [EMAIL PROTECTED] 



  SPONSORED LINKS 
        C programming language   Computer programming languages   Java 
programming language     The c programming language   C programming language   
Concept of programming language 
    
---------------------------------
  YAHOO! GROUPS LINKS 

    
    Visit your group "delphi-en" on the web.
    
    To unsubscribe from this group, send an email to:
 [EMAIL PROTECTED]
    
    Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. 

    
---------------------------------
  



                
---------------------------------
 Yahoo! Mail
 Use Photomail to share photos without annoying attachments.

[Non-text portions of this message have been removed]



-----------------------------------------------------
Home page: http://groups.yahoo.com/group/delphi-en/
To unsubscribe: [EMAIL PROTECTED] 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/delphi-en/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to