Have you tried putting an if Parent = test in your loop?

George


On 5 May 2005 at 13:49, Curtis cloud wrote:

To:                     [email protected]
From:                   Curtis cloud <[EMAIL PROTECTED]>
Date sent:              Thu, 5 May 2005 13:49:09 -0700 (PDT)
Subject:                [delphi-en] Removing dynamically created panels from a 
Groupbx
Send reply to:          [email protected]

> Hey,
>  
> I am having serious problems with removing dynamically created panels from a
> groupbox.
>  
> I am working on a program that has 4 groupboxes. I want to create and remove 
> these panels from the groupboxes based on a control variable. I have a timer 
> that monitors the control variable, it the variable increase the panels 
> increase if the variable decreases then the panels decrease.
>  
> Everything works fine but the removal of the panels. The panels are sel up as 
> an array.
>  
> I have the following loop to remove the panels 
>  
> var
>   PnlNdx : Integer;
> begin
>   {  Loop Through Panels. }
>   For PnlNdx := 0 to High(Executive_Active_Panels) Do Begin
>  
>     {  Remove Component from Window. }
>     RemoveComponent(TComponent(Executive_Active_Panels[PnlNdx]));
>  
>     {  Free Last Panel. }
>     Executive_Active_Panels[PnlNdx].Free;
>     Executive_Active_Panels[PnlNdx] := NIL;
>   End;
>  
>   {  Clear Array of Panels. }
>   SetLength(Executive_Active_Panels, 0);
> 
> end;
>  
> This clears all the panels on the form, how can I clear the panels for a 
> particular groupbox.
>  
> R/Curtis..
> 
>               
> ---------------------------------
> Yahoo! Mail
>  Stay connected, organized, and protected. Take the tour
> 
> [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
> 
> 
> 
>  
> 
> 
> 
> 
> -- 
> GeodenTech : No Incoming Virus Detected
> Checked by AVG Anti-Virus.
> Version: 7.0.308 / Virus Database: 266.11.5 - Release Date: 05/04/2005
> 


-- 

You can also always see what we are selling on eBay at
http://www.juniper8.com/ebayauctions.html


--




-----------------------------------------------------
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