1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
|
procedure TForm1.Button1Click(Sender: TObject);
{Déclaration de variables}
Var Nom, Prenom, Age, Mail : Integer;
begin
Nom := strtoint(Edit1.Text);
Prenom := strtoint(Edit2.Text);
Age := strtoint(Edit3.Text);
Mail := strtoint(Edit4.Text);
if RadioButton1.Checked = TRUE Then
Begin
{Affichage des données personnelles dans ListBox1}
ListBox1.Items.Add ('Nom :' + inttostr(Nom) + 'Prenom :' inttostr(Prenom) + 'Age : ' inttostr(Age) + ' ans' + 'Email :' inttostr(Mail));
End;
{Sinon}
else
Begin
{Affichage des donnée si c'est une femme}
ListBox2.Items.Add ('Nom :' + inttostr(Nom) + 'Prenom :' inttostr(Prenom) + 'Age : ' inttostr(Age) + ' ans' + 'Email :' inttostr(Mail));
End;{Fin du if}
end;
end. |
Partager