Hallo! Ich habe folgendes Problem:
Ich suche mit findComponent Komponenten mit Namen von "F0_0" bis "F19_19".
dies tue ich in zwei verschiedenen prozeduren, nur: einmal klappts und einmal meint der compiler:
| Zitat: |
| [Error] Unit1.pas(204): Undeclared identifier: 'findComponent' |
Find ich doof, denn wenige zeilen vorher gings...
Hier mein quellcode:
Delphi-Quelltext
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12:
| for i := 1 to Length(Antwort.Text) do begin y := IntToStr(StrToInt(y)+1); TPanel(findComponent('F'+x+'_'+y)).caption := UPPERCASE(Antwort.Text)[i]; TPanel(findComponent('F'+x+'_'+y)).Color := clWhite; end;
for i := 0 to 19 do begin for j := 0 to 19 do begin s := 'F'+IntToStr(i)+'_'+IntToStr(j); TPanel(findComponent(s)).Caption := ''; end; end; |
Also ich werd da nicht schlau draus...
