estoy intentando crear una grilla y se me ocurrió hacerlo dentro de un control TableLayout y estoy utilizando este codigo pero no se porque no me funciona me muestra un solo control o amontonados no uno en cada celda. ¿ que estoy haciendo mal.?
private void InitTablero()
{
Button boton = new Button();
for (int i = 0; i < 90; i++)
{
Tabla.Controls.Add(boton);
boton.Height = 500;
boton.Width = 500;
boton.Font = BtSalir.Font;
boton.ForeColor = BtSalir.ForeColor;
boton.Text = (i).ToString();
boton.Tag = i.ToString();
boton.Enabled = false;
boton.Click += new EventHandler(Onb2Click);
}
}
void Onb2Click(object sender, System.EventArgs e)
{
TxBola.Text = "Button" + e;
}