CodePudding user response:
private
Procedure SpeedButton1Click (Sender: TObject);
Public
{Public declarations}
end;
Var
Form1: TForm1;
Implementation
{$R *. DFM}
Procedure TForm1. FormCreate (Sender: TObject);
Var BTN: TspeedButton;
The begin
With TspeedButton. Create (self) to do
The begin
Caption:='click';
Width:=60;
Height:=30;
Name:='btn1';
Parent:=the Self;
Left:=100;
Top:=100;
: OnClick=SpeedButton1Click;
end;
end;
Procedure TForm1. SpeedButton1Click (Sender: TObject);
The begin
ShowMessage (TSpeedButton (the sender). The Name + 'click! ');
end;
CodePudding user response:
Same as above,,,,,,,,CodePudding user response:
That if it has already been into an external program, how behind the external application of the existing SpeedButton, add a? And respond to the clickCodePudding user response:
SpeedButton behind to compute position, had better be specified,CodePudding user response:
Correct answer on the ground floorCodePudding user response:
Last week, I do a software, so it is, most of the interface are automatically generated, mainly control the generated location,CodePudding user response:
If you really need to dynamically generate event codeSuch as floor said what can set some event code, and then is equal to the event,
But if you want to dynamically generated code, need for JAVA SCRIPT or other
CodePudding user response: