Bonjour à tous et joyeuses fêtes.

Je crée dynamiquement des tcaptions que je souhaite afficher dans form1. Mais ça ne fonctionne pas. ça reste blanc. Il ne doit pas manquer grando chose ... le code:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
var  Chiffres:tstringlist;
     Heure:string;
const f='HH:MM:SS:Z';
 
procedure TForm1.Timer1Timer(Sender: TObject);
 
var h:string;i:integer;Etiquette:tlabel;
begin
    h:=heureaFormat(now,F);
    form1.Caption:=h;
    for i:=0 to 10 do begin
        if heure[i]=h[i] then continue;
        Etiquette:=Chiffres.objects[i]as tLabel;
        Etiquette.Caption:=h[i];
    end;
    heure:=h;
 
end;
 
procedure TForm1.FormCreate(Sender: TObject);
var Etiquette:tlabel;i:integer;
begin
    Heure:='          ';
    Chiffres:=tstringlist.create;
    for i:=0 to 10 do begin
        Etiquette:=tlabel.Create(sender as tform1);
        Etiquette.Top:=0;
        Etiquette.Left:=i*20;
        Etiquette.Height:=20;
        Etiquette.Width:=20;
        Etiquette.Visible:=true;
        Etiquette.Font.Color:=clRed;
        Etiquette.Font.Size:=20;
        Etiquette.Caption:=inttostr(i);
        Chiffres.AddObject(inttostr(i),Etiquette);
    end;
 
end;
 
procedure TForm1.FormDestroy(Sender: TObject);
begin
     Chiffres.Free;
end;
Merci d'avance