Exercice Delphi
Manipulation des Listes - ComboBox et RadioGroup
Unit - Screenshot
- Download -
unit C29UExemple2b;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ExtCtrls;
type
TfrmC29Exemple2 = class(TForm)
lbl1txt : TLabel;
lbl2txt : TLabel;
lbl3txt : TLabel;
lblInfo : TLabel;
cbHobby : TComboBox;
rg_sexe : TRadioGroup;
edtNom : TEdit;
btnOK : TButton;
procedure btnOKClick(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
frmC29Exemple2: TfrmC29Exemple2;
implementation
{$R *.dfm}
procedure TfrmC29Exemple2.btnOKClick(Sender: TObject);
var S : string;
begin
S := '';
if rg_Sexe.itemindex=0 then S:='Monsieur ';
if rg_Sexe.itemindex=1 then S:='Madame ';
S := S + edtNom.Text + ' ' + cbHobby.Text;
lblInfo.Caption := S;
end;
end.
c29exem2b.zip
..