Autor Beitrag
Flamefire
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1207
Erhaltene Danke: 31

Win 10
Delphi 2009 Pro, C++ (Visual Studio)
BeitragVerfasst: Mo 15.01.07 15:54 
Wie kann ich alle Label einer Kompo (z.b. GroupBox) zerstören? die Groupbox soll erhalten bleiben.
mkinzler
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 4106
Erhaltene Danke: 13


Delphi 2010 Pro; Delphi.Prism 2011 pro
BeitragVerfasst: Mo 15.01.07 15:57 
Einfach durch alle Komponenten der Form iterieren und alle vom gewünschten typ freigeben.

_________________
Markus Kinzler.
Flamefire Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1207
Erhaltene Danke: 31

Win 10
Delphi 2009 Pro, C++ (Visual Studio)
BeitragVerfasst: Mo 15.01.07 16:12 
:?!?: :?!?: :?!?: :nixweiss:
Haste ein Codeschnipsel?
Andidreas
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 114

Windows XP Pro
BDS 2006
BeitragVerfasst: Mo 15.01.07 19:25 
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
procedure TForm1.Button1Click(Sender: TObject);
var
 I: Integer;
 Edit: TComponent;
begin
 for I:=1 to 10 do
 begin
   Edit:=FindComponent('Edit'+IntToStr(I));
   if Edit is TEdit then
     TEdit(Edit).Free;
 end;
end;


Entsprechend für Label ändern.

Mal als kleinen Tipp: EasyHelper