Fórum Componente não é destruido #352767
31/01/2008
0
Estou criando assim:
//panel1 recebe botões de sistema
vg_panel[1] := TPanel.Create(NIL);
WITH vg_panel[1] DO
BEGIN
Parent := Self;
Left := 16;
Top := 48;
Width := 489;
Height := 281;
TabOrder := 18;
Visible := TRUE;
END;
E destruindo assim:
vg_panel[1].Destroy;
vg_panel[1]:= NIL;
vg_panel[1].Free;
ou
FreeAndNil(vg_panel[1]);
Du_nirvana
Curtir tópico
+ 0Posts
31/01/2008
Du_nirvana
Gostei + 0
31/01/2008
Djjunior
procedure TForm2.DestroiPanels; var i: integer; panel: TPanel; begin for I := 1 to IndCreat do begin panel := TPanel(FindComponent(´panel´ + intToStr(i))); if panel <> nil then FreeAndNIl(panel); end; IndCreat := 0; end; o IndCreat é uma variável que vou incrementando a medida que tenho vou criando os componentes
Gostei + 0
31/01/2008
Du_nirvana
Gostei + 0
31/01/2008
Rodc
Gostei + 0
31/01/2008
Du_nirvana
Gostei + 0
01/02/2008
Du_nirvana
Gostei + 0
01/02/2008
Du_nirvana
Gostei + 0
01/02/2008
Djjunior
Gostei + 0
Clique aqui para fazer login e interagir na Comunidade :)