I have a few Panels created at runtime, and thus the name is automatically assigned like PanelArray[X].Name := ‘Panel’ + IntToStr(X);
Now I need to delete a specific Panel in this array, with the name, for example Panel27.
Thanks in advance
20 March 2010.
I have a few Panels created at runtime, and thus the name is automatically assigned like PanelArray[X].Name := ‘Panel’ + IntToStr(X);
Now I need to delete a specific Panel in this array, with the name, for example Panel27.
Thanks in advance
How about…
PanelArray[X].Free;
PanelArray[X] := Nil;
hi
For i :=0 to ComponentCount -1 do
If (Components[i] is TPanel ) Then
If ( TPanel(Components[i]).Name=’Panel27′) Then
TPanel(Components[i]).Free;