unit Test;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TRadioButton =
class(StdCtrls.TRadioButton)
private
FEdit: TEdit;
public
property Edit: TEdit
read FEdit
write FEdit;
end;
TfrmTestMain =
class(TForm)
RadioButton1: TRadioButton;
Edit1: TEdit;
RadioButton2: TRadioButton;
Edit2: TEdit;
RadioButton3: TRadioButton;
Edit3: TEdit;
RadioButton4: TRadioButton;
Edit4: TEdit;
RadioButton5: TRadioButton;
Edit5: TEdit;
procedure FormCreate(Sender: TObject);
procedure RadioButton1Click(Sender: TObject);
private
{ Private-Deklarationen }
public
{ Public-Deklarationen }
end;
var
frmTestMain: TfrmTestMain;
implementation
{$R *.dfm}
procedure TfrmTestMain.FormCreate(Sender: TObject);
begin
RadioButton1.Edit := Edit1;
RadioButton2.Edit := Edit2;
RadioButton3.Edit := Edit3;
RadioButton4.Edit := Edit4;
RadioButton5.Edit := Edit5;
end;
procedure TfrmTestMain.RadioButton1Click(Sender: TObject);
begin
if Sender
is TRadioButton
then
TRadioButton(Sender).Edit.Text := '
Hallo Welt';
end;
end.