J'aimerais transmettre ma procedure AfficherProduit à ma méthode InitNouveauBouton, mais je n'y arrive pas...
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12 procedure TfraChoix.AfficherProduit(Sender: TObject); var frmReception: TfrmReception; begin frmReception := TfrmReception.Create(Self, TOutlookButton(Sender).Tag); try frmReception.ShowModal finally frmReception.Release; end; end;
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6 constructor TfraChoix.Create(AOwner: TComponent); begin inherited; FDataOutlookBar.InitNouveauBouton(AfficherProduit); end;Merci d'avance !
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5 procedure TDataOutlookBar.InitNouveauBouton(...???? ); begin obbBouton := TOutlookButton.Create(FOutlookBar); obbBouton.OnClick := AfficherProduit; end;
Partager