Código
begin
If (frmTeste_padrao.components[I] is TEdit) AND ((Components[I]).Name = 'vl_parcela'+inttostr(clt))
then
begin
frmTeste_padrao.Components[I].Free;
inc(clt,1);
end
else I:= I + 1;
end;
I:=0;
While I < frmTeste_padrao.ComponentCount do
begin
If (frmTeste_padrao.components[I] is Tlabel) AND ((Components[I]).Name = 'Parcela'+inttostr(lbt)) then
begin
frmTeste_padrao.Components[I].Free;
inc(lbt,1);
end
else I:= I + 1;
end;
# Autor MC
Onde AND ((Components[I]).Name = 'vl_parcela'+inttostr(clt)) é a condição de criação de nomenclaturas para que sejam somente destuidos os que foram criados assim não aftam outros objetos
Planeta Delphi - www.planetadelphi.com.br - Todos os direitos reservados | Copyright 2001-2009