Autor Beitrag
Tenner
Hält's aus hier
Beiträge: 2



BeitragVerfasst: Mo 26.01.04 20:07 
Hallo ich habe mal eine kleine frage gibt es sowas wie es z.b.
bei ganz normalen for to do schleifen gibt
ausblenden Delphi-Quelltext
1:
2:
3:
4:
for i:=1 to 10 do
begin
Z:=i;
end;

hier ist es so i wird hochgezählt ich habe das selbe jetzt nun bei komponenten vor
das anstatt checkbox1.checked:=true checkbox+i oder was weiß oich ich möchte das checkbox1 checkbox2 von alleine hochgezählt wird.


bye Tenner

Moderiert von user profile iconPeter Lustig: Delphi-Tags hinzugefügt
Christian S.
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 20451
Erhaltene Danke: 2264

Win 10
C# (VS 2019)
BeitragVerfasst: Mo 26.01.04 20:35 
Hallo!

Das geht mit der Funktion "FindComponent". Benutzt wird sie so:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
for i:=1 to 10 do
begin
  TCheckBox(FindComponent('checkbox'+IntToStr(i))).checked := true;
end;


MfG
Peter

_________________
Zwei Worte werden Dir im Leben viele Türen öffnen - "ziehen" und "drücken".
Tenner Threadstarter
Hält's aus hier
Beiträge: 2



BeitragVerfasst: Mo 26.01.04 20:53 
juhu du bistn schatz dankeschön ha mir die ganze zeit schonmal gefehlt
Christian S.
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 20451
Erhaltene Danke: 2264

Win 10
C# (VS 2019)
BeitragVerfasst: Mo 26.01.04 21:22 
Ist doch schön, wenn man sieht, wie sich jemand drüber freut. :-) Das motiviert!

_________________
Zwei Worte werden Dir im Leben viele Türen öffnen - "ziehen" und "drücken".
adler
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 511

Windows XP
Delphi 05 Pers
BeitragVerfasst: Mo 26.01.04 21:27 
Mh...
... hätte ich das früher gewusst ^^

_________________
Wo's nix zu gucken gibt, gibts vielleicht was zu hören.
Christian S.
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 20451
Erhaltene Danke: 2264

Win 10
C# (VS 2019)
BeitragVerfasst: Mo 26.01.04 21:55 
Pardon?

_________________
Zwei Worte werden Dir im Leben viele Türen öffnen - "ziehen" und "drücken".