Delphi-Quellcode:
if s_rot.Brush.Color = clred then
begin
s_gelb.Brush.Color :=clyellow;
end
else
begin
if s_gelb.brush.color =clyellow then
begin
s_rot.Brush.Color :=clwhite;
s_gelb.Brush.Color :=clwhite;
s_gruen.brush.color :=clgreen;
end
else
begin
if s_gruen.brush.color =clgreen then
begin
s_gruen.Brush.Color :=clwhite;
s_gelb.Brush.Color :=clyellow;
end
else
begin
s_gelb.Brush.color :=clwhite;
s_rot.brush.color :=clred
end;
end;
end;
Ich habe einige begins und ends eingefügt, probier das mal aus