Autor Beitrag
reptile
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 40



BeitragVerfasst: Sa 07.10.06 15:20 
so also : ich hab ein kleines problem , weiß aber gar nicht wie ich es nennen soll deshalb hat auch die suche nichts ergeben.
ich versuch das mal zu beschreiben :
ich habe relativ viele ( 100 ) bilder auf einer form und möchte die irgendwie verändern.
es wäre aber umständlich für jedes bild ne zeile zu schreiben,deshalb dachte ich das könnte mit einer schleife gehen.das problem ist wie "springe ich von einem bild zum nächsten" ?

also beispiel mit panels : ich hab 5 panels und will sie alle mit 'test' beschriften
ich dachte mir das irgendwie so :

for a := 1 to 5 do begin
panela.caption := 'test';
end;

anstatt panela soll er dann halt nacheinander panel1, panel2,panel3.. nehmen

geht das ? waere nett ^^
Blackheart666
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2195

XP
D3Prof, D6Pers.
BeitragVerfasst: Sa 07.10.06 15:29 
Schau mal nach FindComponent
Gausi
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 8554
Erhaltene Danke: 481

Windows 7, Windows 10
D7 PE, Delphi XE3 Prof, Delphi 10.3 CE
BeitragVerfasst: Sa 07.10.06 15:39 
Da ich gerade ein Projekt offen habe, kopier ich das da mal raus:
ausblenden Delphi-Quelltext
1:
2:
aLabel := TLabel(HighScorePanel.FindComponent('platzlbl'+inttostr(i)));
aLabel.caption := 'Platz ' + inttostr(i);


HighscorePanel ist das ParentControl der Label, die bei mir platzlblX heißen.

_________________
We are, we were and will not be.
reptile Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 40



BeitragVerfasst: Sa 07.10.06 15:39 
ich glaube das isses , aber ich versteh das auf anhieb nicht was in der delphi hilfe steht.
kann mir jemand das panel beispiel oben coden, das ist doch bestimmt easy oder ?
reptile Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 40



BeitragVerfasst: Sa 07.10.06 15:51 
moment jetzt hab ichs kapiert ^^
funktioniert perfekt kann mich nur bedanken