Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   GUI-Design mit VCL / FireMonkey / Common Controls (https://www.delphipraxis.net/18-gui-design-mit-vcl-firemonkey-common-controls/)
-   -   Delphi variables TEdit-Felder nutzen (https://www.delphipraxis.net/76251-variables-tedit-felder-nutzen.html)

frielix 31. Aug 2006 23:04


variables TEdit-Felder nutzen
 
Hi,
ich habe eine Schleife (
Code:
for i := 2 to paare do begin
).
Und ich möchte je nach Durchlauf, auf ein anderes Edit-Feld zugreifen.
Das soll Fortlaufend sein. also beim 3. Durchlauf Edit3 bei 4. Edit4 usw...

Wäre nett wenn mir das jemand erklären könnte :-D

und schon mal danke im vorraus :wink:

pacman1986 31. Aug 2006 23:15

Re: variables TEdit-Felder nutzen
 
gabs hier schon zig mal :D Stichwort Findcomponent

Delphi-Quellcode:
var i:integer
begin
  for i:=1 to 10 do begin
   (FindComponent('Edit'+inttostr(i)) as TEdit).Text:='Text Nr. : '+inttostr(i);
  end;
end;
hab ich aber noch nicht getestet sollte gehen :D


Alle Zeitangaben in WEZ +1. Es ist jetzt 00:06 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz