Limpar Flowpanel

Delphi

18/02/2015

Estou fazendo o curso de iniciante de Delphi e tem um exercício para criar Label e Edit no flowpanel conforme código abaixo:

var
I : Integer;
L : TLabel;
E : TEdit;
begin
for I := 1 to 10 do
begin
FlowPanel1.FlowStyle := fsTopBottomLeftRight;
L := TLabel.Create(Self);
L.Parent := FlowPanel1;
L.Caption := 'Controlar' + ' ' + IntToStr(I);
L.Margins.Top := 2;
L.AlignWithMargins := True;

E := TEdit.Create(Self);
E.Parent := FlowPanel1;
E.Margins.Top := 0;
E.AlignWithMargins := True;
end;

Até ai tudo bem.

O que é quero saber é como eu faço para limpar o flowpanel na próxima vez que eu clicar no botão criar.
David Sobral

David Sobral

Curtidas 0

Respostas

Ricardo

Ricardo

18/02/2015

Tente

E.free
L.free
GOSTEI 0
David Sobral

David Sobral

18/02/2015

Ricardo coloquei o código mencionado e não deu certo.
GOSTEI 0
POSTAR