N
netbug
Unregistered / Unconfirmed
GUEST, unregistred user!
请看:
type
TForm1 = class(TForm)
Button1: TButton;
Button2: TButton;
Button3: TButton;
procedure Button3Click(Sender: TObject);
end;
var
Form1: TForm1;
implementation
{$R *.DFM}
procedure TForm1.Button3Click(Sender: TObject);
begin
if sender=button1 then showmessage('one');
if sender=button2 then showmessage('two') else showmessage('three');
end;
我想让Button1与Button2的OnClick共享Button3的OnClick,我该如何做?
谢谢。
type
TForm1 = class(TForm)
Button1: TButton;
Button2: TButton;
Button3: TButton;
procedure Button3Click(Sender: TObject);
end;
var
Form1: TForm1;
implementation
{$R *.DFM}
procedure TForm1.Button3Click(Sender: TObject);
begin
if sender=button1 then showmessage('one');
if sender=button2 then showmessage('two') else showmessage('three');
end;
我想让Button1与Button2的OnClick共享Button3的OnClick,我该如何做?
谢谢。