S
seared2008
Unregistered / Unconfirmed
GUEST, unregistred user!
我的窗体中有两个按钮,我想在一个按钮的click事件当中调用另一个按钮的click事件怎么作?
如:
procedure TForm1.Button1Click(Sender: TObject);
begin
if Edit1.text='' then begin
edit.text='me'
end else begin
[blue][brown]form1.Button1.Action :=form1.Button2.OnClick [/brown];[/blue]
end;
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
if Edit1.text='me' then begin
edit.text='go'
end else begin
[blue][brown]form1.Button1.[red]Action [/red] :=form1.Button2.OnClick [/brown];[/blue]
end;
end;
如:
procedure TForm1.Button1Click(Sender: TObject);
begin
if Edit1.text='' then begin
edit.text='me'
end else begin
[blue][brown]form1.Button1.Action :=form1.Button2.OnClick [/brown];[/blue]
end;
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
if Edit1.text='me' then begin
edit.text='go'
end else begin
[blue][brown]form1.Button1.[red]Action [/red] :=form1.Button2.OnClick [/brown];[/blue]
end;
end;