Este es el codigo que me salio, tiene cuatro speedbutton, dos button y un label
Código Delphi
[-]
var
Form1: TForm1;
Btns: array[1..4] of TSpeedButton;
implementation
{$R *.dfm}
procedure TForm1.Button2Click(Sender: TObject);
var x,y,t:integer;
begin
y:=strtoint(label1.Caption);
t:=4*y;
if y<=3 then
label1.caption:=inttostr(y+1) else exit;
for x:=1 to 4 do
begin
Btns[x]:=TSpeedButton(FindComponent('Boton'+IntToStr(x)));
Btns[x].caption:=inttostr(t+x);
end;
end;
procedure TForm1.Button1Click(Sender: TObject);
var x,y,t:integer;
begin
y:=strtoint(label1.Caption);
if y>1 then
begin
label1.caption:=inttostr(y-1);
y:=y-1;
end;
t:=4*y;
for x:=1 to 4 do
begin
Btns[x]:=TSpeedButton(FindComponent('Boton'+IntToStr(x)));
Btns[x].caption:=inttostr(t+(x-4));
end;
end;
procedure TForm1.FormCreate(Sender: TObject);
var x:integer;
begin
for x:=1 to 4 do
begin
Btns[x]:=TSpeedButton(FindComponent('Boton'+IntToStr(x)));
Btns[x].caption:=inttostr(x);
end;
end;
end.