Autor Beitrag
mtc
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 16

Win XP, Suse 8.1 Prof
D7 Prof
BeitragVerfasst: Fr 04.07.03 22:56 
Hi,

ich hab folgendes Problem, wie schaffe ich es, dass ich in einer FOR Schleife einen String mit einer Länge von 20 in 20 verschiedene Edit-Felder schreiben kann???

Ich könnte sie zwar einzel hinschreiben, aber dass muss doch auch über den Laufindex der FOR Schleife möglich sein oder ???

á la
ausblenden Delphi-Quelltext
1:
2:
3:
4:
for i=1 to 10 do
begin
   edit[i].text:=string[i];
end;

So ungefähr hab ich mir das gedacht, aber wie realisiere ich das ???

MfG

MTC
FriFra
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 557

Win XP Prof, Win XP Home,Win Server 2003,Win 98SE,Win 2000,Win NT4,Win 3.11,Suse Linux 7.3 Prof,Suse Linux 8.0 Prof
D2k5 Prof, D7 Prof, D5 Standard, D3 Prof, K3 Prof
BeitragVerfasst: Fr 04.07.03 22:59 
Hier ist einer der vielen Beiträge zu diesem Thema...
www.delphi-forum.de/...hlight=findcomponent

_________________
Michael
(principal certified lotus professional - developer)
Tweafis
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 647

WinXP + fbsd
Delphi 5 Prof
BeitragVerfasst: Fr 04.07.03 23:00 
entweder du erstellst die edits in deinem FromCreate alle dynamisch oder du nennst sie alle z.b. edVert1 - edVert20 und dann per

ausblenden Delphi-Quelltext
1:
2:
for i=1 to 10 do
  (FindComponent('edVert'+inttostr(i)) as TEdit).Text := deinString;

_________________
.: Es wird der Tag kommen, an dem wir es nicht mehr ändern können :.
mtc Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 16

Win XP, Suse 8.1 Prof
D7 Prof
BeitragVerfasst: Fr 04.07.03 23:06 
Ich dank euch !!!

Funzt super und sorry das ich nicht die Such-Funktion genutzt habe.

MfG

MTC