Das mit Findcomponent funktionierte wunderbar bis ich das ganze in eine Funktion geschrieben habe. jetzt git es probleme:
[Fehler] Unit3.pas(123): Undefinierter Bezeichner: 'FindComponent'
Delphi-Quelltext
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25:
| function image_down:byte; begin if (auswahl=11)and (aendern= false)then begin form3.label11.Font.color:= clblack; form3.label1.font.color:= clred; auswahl:=1; end else begin if (aendern=false)and (Tlabel(FindComponent('form3.label'+InttoStr(auswahl))).font.color = clred) then begin Tlabel(FindComponent('label'+InttoStr(auswahl+1))).font.color:= clred ; Tlabel(FindComponent('label'+InttoStr(auswahl))).font.color:= clblack ;
inc(auswahl); end; end; application.ProcessMessages; if (aendern= true)then begin zahlaendern2:=zahlaendern2-1; Tlabel(FindComponent('lbl_zahl'+InttoStr(test))).caption:= inttostr(zahlaendern2); end; end; |
hoffe das mir jemand helfen kann
mfg,
Covel
Moderiert von
Tino: Code- durch Delphi-Tags ersetzt.