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 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94
| unit Unit2;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ComCtrls;
type
TForm2 = class(TForm)
TabControl1: TTabControl;
Label1: TLabel;
date1: TEdit;
Label2: TLabel;
Date2: TEdit;
Label3: TLabel;
TabControl2: TTabControl;
procedure FormCreate(Sender: TObject);
private
public
CaseEsn : array [0..19] of TCheckBox;
EditEsn : array [0..19] of TEdit;
CaseAs : array [0..19] of TCheckBox;
EditAs : array [0..19] of TEdit;
end;
var
Form2: TForm2;
implementation
{$R *.dfm}
procedure TForm2.FormCreate(Sender: TObject);
var
x, tampon : integer;
begin
tampon := 0;
for x:=0 to 9 do begin
CaseEsn[x]:= TCheckBox.create (self);
CaseEsn[x].Parent:= self;
CaseEsn[x].Width := 30; // largeur du bouton
CaseEsn[x].Top := (x*40)+220; // haut
CaseEsn[x].Height := 30; // hauteur du bouton
CaseEsn[x].Left:= 50;
EditEsn[x]:= TEdit.create (self);
EditEsn[x].Parent:= self;
EditEsn[x].Width := 150; // largeur du bouton
EditEsn[x].Top := (x*40)+224; // haut
EditEsn[x].Height := 30; // hauteur du bouton
EditEsn[x].Left:= 70;
CaseAs[x]:= TCheckBox.create (self);
CaseAs[x].Parent:= self;
CaseAs[x].Width := 30; // largeur du bouton
CaseAs[x].Top := (x*40)+220; // haut
CaseAs[x].Height := 30; // hauteur du bouton
CaseAs[x].Left:= 670;
EditAs[x]:= TEdit.create (self);
EditAs[x].Parent:= self;
EditAs[x].Width := 150; // largeur du bouton
EditAs[x].Top := (x*40)+224; // haut
EditAs[x].Height := 30; // hauteur du bouton
EditAs[x].Left:= 690;
end;
for x:=10 to 19 do begin
CaseEsn[x]:= TCheckBox.create (self);
CaseEsn[x].Parent:= self;
CaseEsn[x].Width := 30; // largeur du bouton
CaseEsn[x].Top := (tampon*40)+220; // haut
CaseEsn[x].Height := 30; // hauteur du bouton
CaseEsn[x].Left:= 290;
EditEsn[x]:= TEdit.create (self);
EditEsn[x].Parent:= self;
EditEsn[x].Width := 150; // largeur du bouton
EditEsn[x].Top := (tampon*40)+224; // haut
EditEsn[x].Height := 30; // hauteur du bouton
EditEsn[x].Left:= 310;
tampon := tampon+1;
end;
end;
end. |
Partager