[SOLVED] Change a TLable Color, how to? lazarus / 21-General ---------------------------------------------------------------------- 1HuntnMan · 2023-11-23 15:47 Probably simple but can't figure a way to program this. Basically, have a Procedure that rebuilds/creates the system database. I have a Progress Bar and figured out how to make it PROGRESS, LoL!  But the TLabel above it Caption is assigned Progress ... as the progressbar's position is incremented by values of 10 to 100. At the end, I want to change the Label caption to Completed! but to green which do that but also flashing Green.  So, is there a way instead of rewriting a for...loop just erasing the caption from Completed to blank then back to Completed! over and over in the loop? I like special affects! Maybe also add a buzz or the sound of a jet landing! ---------------------------------------------------------------------- Handoko · 2023-11-23 17:06 Did you mean something like this: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i unit Unit1; {$mode objfpc}{$H+} interface uses  Classes, SysUtils, Forms, Controls, Graphics, ComCtrls, StdCtrls, ExtCtrls; type   { TForm1 }   TForm1 = class(TForm)    Button1: TButton;    Label1: TLabel;    ProgressBar1: TProgressBar;    Timer1: TTimer;    procedure Button1Click(Sender: TObject);    procedure FormClose(Sender: TObject; var CloseAction: TCloseAction);    procedure FormCreate(Sender: TObject);    procedure Timer1Timer(Sender: TObject);  end; var  Form1: TForm1; implementation {$R *.lfm} { TForm1 } procedure TForm1.Button1Click(Sender: TObject);const  MaxCount = 1000;  Delay    = 8;var  i: Integer;begin  Button1.Enabled   := False;  Timer1.Enabled    := False;  Label1.Font.Color := clBlack;  i := 0;  repeat    Inc(i);    ProgressBar1.Position := i div 10;    Label1.Caption := 'Progress : ' + (i/MaxCount * 100).ToString + '%';  Sleep(Delay);    Application.ProcessMessages;  until i >= MaxCount;  Label1.Caption  := 'Process completed!';  Timer1.Enabled  := True;  Button1.Enabled := True;end; procedure TForm1.FormClose(Sender: TObject; var CloseAction: TCloseAction);begin  Halt;end; procedure TForm1.FormCreate(Sender: TObject);begin  ProgressBar1.Smooth := True;  Timer1.Enabled      := False;  Timer1.Interval     := 30;end; procedure TForm1.Timer1Timer(Sender: TObject);const  Brightness: Byte = 255;begin  case Brightness > 50 of    True:  Dec(Brightness, 5);    False: Brightness := 255;  end;  Label1.Font.Color := RGBToColor(0, Brightness, 0);end; end. ---------------------------------------------------------------------- 1HuntnMan · 2023-11-23 18:09 Ok Handoko, thanks! That's more than I expected but taught me a different way to do what I programmed! Back to revamping the way I programmed it.  I just updated the ProgressBar's position through out the procedure of rebuilding the tables the way you did it and so on.