Hola.
Código PHP:
...
void __fastcall TForm1::FormCreate(TObject *Sender)
{
for( int a = 0; a < 100; a++ )
{
Boton[a] = new TButton(this);
Boton[a]->Top = a * 25 + 10;
Boton[a]->Tag = a+1;
Boton[a]->Name = "Button" + IntToStr(a+1);
Boton[a]->OnClick = botonCliqueado;
Boton[a]->Parent = ScrollBox1;
}
}
void __fastcall TForm1::botonCliqueado(TObject *Sender)
{
TButton *bt = static_cast<TButton*>(Sender);
ShowMessage("Name: " + bt->Name + "\nTag: " + IntToStr(bt->Tag));
}
...
Saludos