Autor Beitrag
Tristan
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 106



BeitragVerfasst: So 12.03.06 16:53 
Ist es möglich mehrere dynamisch erzeugte Elemente z.b. Buttons nach ihren Eigenschaften mit einer Schleife abzufragen?

Also so ähnlich wie
ausblenden Delphi-Quelltext
1:
2:
For i:=0 to 5 do
Button[i].Caption:='Test';


Moderiert von user profile iconChristian S.: Delphi-Tags hinzugefügt
Marco D.
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 2750

Windows Vista
Delphi 7, Delphi 2005 PE, PHP 4 + 5 (Notepad++), Java (Eclipse), XML, XML Schema, ABAP, ABAP OO
BeitragVerfasst: So 12.03.06 16:58 
Wo ist nun das Problem?
ausblenden Delphi-Quelltext
1:
2:
For i:=0 to 5 do
showmessage('Die Caption von Button '+inttostr(i)+' ist '+button[i].caption);

_________________
Pascal keeps your hand tied. C gives you enough rope to hang yourself. C++ gives you enough rope to shoot yourself in the foot
Neidhard von Reuental
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 268

XP
BDS 2006 Prof
BeitragVerfasst: So 12.03.06 17:05 
So lange Button ein Array ist, sollte das so klappen.
Marco D.
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 2750

Windows Vista
Delphi 7, Delphi 2005 PE, PHP 4 + 5 (Notepad++), Java (Eclipse), XML, XML Schema, ABAP, ABAP OO
BeitragVerfasst: So 12.03.06 17:16 
Nichts für ungut: Aber warum hat Tristan es nicht selbst ausprobiert? Das war doch so richtig, wie es in seinem Posting steht :gruebel:

_________________
Pascal keeps your hand tied. C gives you enough rope to hang yourself. C++ gives you enough rope to shoot yourself in the foot
Tristan Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 106



BeitragVerfasst: So 12.03.06 19:47 
sry ich glaueb ich hatte die Klammern verwechselt - deshalb funktionierte das nicht.