Bonjour à tous,

Voilà ce que j'aimerais réaliser :
J'ai une fiche fournisseur qui comprends le nom de la société, l'adresse, téléphone, fax, ...
Je voudrais y ajouter une liste de contact du fournisseur dans un PageControl
Voici le code puisé en partie sur ce site :
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
procedure TfrmSuppliers.sbAddContactClick(Sender: TObject);
var
  tbs : TTabSheet;
  i : integer;
  tblTitle: array[0..3] of string;
begin
  //On s'assure que Self est un descendant de TComponent
  assert(Self is TComponent, 'L''objet Self n''est pas un descendant de TComponent');
  tbs := TTabSheet.Create(self);
  tblTitle[0] := 'Nom :';
  tblTitle[1] := 'Fonction :';
  tblTitle[2] := 'Téléphone :';
  tblTitle[3] := 'Mail :';
  for i:= 0 to 3 do
  begin
    with TLabel.Create(self) do
    begin
      Left := 10;
      Top := 8 + (i*25);
      Caption := tblTitle[i];
      Parent := tbs;
    end;
    with TDBEdit.Create(self) do
    begin
      Left := 90;
      Top := 5 + (i*25);
      Parent := tbs;
    end;
  end;
  tbs.PageControl := pcContact;
  tbs.Caption := 'n°' + intToStr(pcContact.PageCount);
end;
Ca fonctionne bien visuellement mais je ne sais pas du tout comment je pourrais relier les données des contacts...