Einzelnen Beitrag anzeigen

Benutzerbild von d3g
d3g

Registriert seit: 21. Jun 2002
602 Beiträge
 
#2
  Alt 26. Dez 2002, 11:53
Hi XzibiT,

du kannst das mit TComponent.FindComponent() machen:

Delphi-Quellcode:
type
  TMyForm = class(TForm)
  // ...
  [b]private[/b]
    procedure DeletePanel(Name: String);
end;

// ...

procedure TMyForm.DeletePanel(Name: String);
begin
  TPanel(FindComponent('PU' + Name)).Free;
end;
MfG,
d3g
-- Crucifixion?
-- Yes.
-- Good. Out of the door, line on the left, one cross each.
  Mit Zitat antworten Zitat