Stimmt
Die Prozedur sieht nun so aus:
Code:
procedure TForm1.color_dreieck_timerTimer(Sender: TObject);
begin
        color_dreieck_zaehler := color_dreieck_zaehler+1;
        if color_dreieck_zaehler = 2 then canvas.Canvas.Brush.Color := clWhite;
        if color_dreieck_zaehler = 3 then canvas.Canvas.Brush.Color := clGray;
        if color_dreieck_zaehler = 4 then canvas.Canvas.Brush.Color := clYellow;
        if color_dreieck_zaehler = 5 then canvas.Canvas.Brush.Color := clOlive;
        if color_dreieck_zaehler = 6 then canvas.Canvas.Brush.Color := clGreen;
        if color_dreieck_zaehler = 7 then canvas.Canvas.Brush.Color := clLime;
        if color_dreieck_zaehler = 8 then canvas.Canvas.Brush.Color := clAqua;
        if color_dreieck_zaehler = 9 then canvas.Canvas.Brush.Color := clTeal;
        if color_dreieck_zaehler = 10 then canvas.Canvas.Brush.Color := clBlue;
        if color_dreieck_zaehler = 11 then canvas.Canvas.Brush.Color := clNavy;
        if color_dreieck_zaehler = 12 then canvas.Canvas.Brush.Color := clPurple;
        if color_dreieck_zaehler = 13 then canvas.Canvas.Brush.Color := clFuchsia;
        if color_dreieck_zaehler = 14 then canvas.Canvas.Brush.Color := clMaroon;
        if color_dreieck_zaehler = 15 then canvas.Canvas.Brush.Color := clRed;
if color_dreieck_zaehler = 16 then begin
        canvas.Canvas.Brush.Color := clBlack;
        color_dreieck_zaehler := 1;
end;
        canvas.Canvas.FloodFill(60,260,clRed,fsBorder);
        color_dreieck_timer.Enabled := false;
end;
Dann funktioniert es wieder, bis das Dreieck mit clRed gefüllt wurde, danach verbleibt jene Farbe, auch bei weiteren Klicks.