Autor Beitrag
SHIFTER
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 65

Win 2k SRV, Win XP, Vista, SuSe Linux SRV
Delphi 11
BeitragVerfasst: Mo 23.09.02 21:38 
Hi,
ich habe mehrere eingabefelder, wie kann ich z.B. alle oder ein teil von diesen auf einmal z.B. Löschen.

z.B.
Ich habe edit1 bis edit20 und ich möchte edit1 bis edit10 auf ein mal löschen oder anders bearbeiten. :?:

gruss
seba
DeCodeGuru
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1333
Erhaltene Danke: 1

Arch Linux
Eclipse
BeitragVerfasst: Mo 23.09.02 21:58 
wenn die namen der Edits "Edit1", "Edit2"... sind, dann versuchs mal mit folgendem Code:

ausblenden Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
var
  i: Integer;
begin
  for i := 1 to 20 do
  begin
    TEdit(FindComponent('Edit'+IntToStr(i))).Text := 'Hallo';
  end;
end;


Natürlich werden die Komponenten nicht zeitgleich gelöscht, aber es verkürzt auf jeden Fall das "Auschreiben" des Codes. Vielleicht hilft dir das.

_________________
Viele Grüße
Jakob
SHIFTER Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 65

Win 2k SRV, Win XP, Vista, SuSe Linux SRV
Delphi 11
BeitragVerfasst: Mo 23.09.02 22:06 
:D Hej echt toll ! Danke für die SCHNELLE HILFE !!!! Dankeschön. :D

Gruss aus Wuppertal

Seba
DeCodeGuru
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1333
Erhaltene Danke: 1

Arch Linux
Eclipse
BeitragVerfasst: Di 24.09.02 13:54 
Zitat:
Hej echt toll ! Danke für die SCHNELLE HILFE !!!! Dankeschön.


Nichts zu danken :wink:

_________________
Viele Grüße
Jakob