Autor Beitrag
covel
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 131

Win XP PRo
Borland D7/C#
BeitragVerfasst: Sa 05.03.05 13:19 
hallo

haben ne kleine frage!! Ist es möglich die Labels in einer for Schleife/Anweisung(?)
wie unten beschrieben anzusprechen?


ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
for i:=1 to 6 do

begin
if (lbl_player(i).visible= true) then
begin
lbl_player1.Font.color:=clblack;
lbl_player(i).Font.color:=clRed;
i=6;
end;
end;



so geht es leider nicht kann mir bitte jemand helfen?!?!?

grüße Covel

Moderiert von user profile iconraziel: Delphi-Tags hinzugefügt.
raziel
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 2453

Arch Linux
JS (WebStorm), C#, C++/CLI, C++ (VS2013)
BeitragVerfasst: Sa 05.03.05 13:21 
Hallo,

such doch mal im Forum nach Suche in: Delphi-Forum, Delphi-Library FINDCOMPONENT.

Gruß,
raziel

_________________
JSXGraph
covel Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 131

Win XP PRo
Borland D7/C#
BeitragVerfasst: So 06.03.05 15:34 
besten dank

hast mir sehr geholfen

grüße covel
covel Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 131

Win XP PRo
Borland D7/C#
BeitragVerfasst: Do 10.03.05 16:43 
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'

ausblenden 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 user profile iconTino: Code- durch Delphi-Tags ersetzt.
covel Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 131

Win XP PRo
Borland D7/C#
BeitragVerfasst: Do 10.03.05 16:58 
hat sich schon erledigt muss wie folgt lauten form3.find....


manchmal bin ich echt blind/blöd


mfg Covel