D
DELK
Unregistered / Unconfirmed
GUEST, unregistred user!
procedure TForm1.Button3Click(Sender: TObject);
var
i:integer;
begin
setlength(Speedbutton,3);
Speedbutton[0]:=TSpeedbutton.Create(Form1);
Speedbutton[0].Parent:=Form1;
Speedbutton[0].Width:=23;
Speedbutton[0].Height:=23;
speedbutton[0].Left:=20;
Speedbutton[0].Top:=112;
Speedbutton[0].AllowAllUp:=true;
Speedbutton[0].GroupIndex:=2;
for i:=1 to 2 do
begin
Speedbutton:=TSpeedbutton.Create(Form1);
Speedbutton.Parent:=Form1;
speedbutton.Width:=Speedbutton[1].Width;
speedbutton.Height:=Speedbutton[1].Height;
speedbutton.Left:=Speedbutton[i-1].Left+speedbutton[1].Width-1;
Speedbutton.Top:=Speedbutton[i-1].Top;
Speedbutton.AllowAllUp:=true;//
Speedbutton.GroupIndex:=i+1;
我动态的生成了3个speedbutton按钮但是要写这三个按钮的click事件不知道该怎样写了
谁能帮我谢谢!
var
i:integer;
begin
setlength(Speedbutton,3);
Speedbutton[0]:=TSpeedbutton.Create(Form1);
Speedbutton[0].Parent:=Form1;
Speedbutton[0].Width:=23;
Speedbutton[0].Height:=23;
speedbutton[0].Left:=20;
Speedbutton[0].Top:=112;
Speedbutton[0].AllowAllUp:=true;
Speedbutton[0].GroupIndex:=2;
for i:=1 to 2 do
begin
Speedbutton:=TSpeedbutton.Create(Form1);
Speedbutton.Parent:=Form1;
speedbutton.Width:=Speedbutton[1].Width;
speedbutton.Height:=Speedbutton[1].Height;
speedbutton.Left:=Speedbutton[i-1].Left+speedbutton[1].Width-1;
Speedbutton.Top:=Speedbutton[i-1].Top;
Speedbutton.AllowAllUp:=true;//
Speedbutton.GroupIndex:=i+1;
我动态的生成了3个speedbutton按钮但是要写这三个按钮的click事件不知道该怎样写了
谁能帮我谢谢!