Ex de como criar um button dinamicamente
04/02/2007
0
void Button1Click(object sender, System.EventArgs e)
{
Button novoBotao = new Button();
this.Controls.Add(novoBotao);
//valores do novo botão
novoBotao.Top = 20;
novoBotao.Left = 10;
novoBotao.Width = 35;
novoBotao.Height = 35;
novoBotao.Text=´ok´;
}
//abaixo mais dicas rapidas
//http://www.orkut.com/Community.aspx?cmm=22701441
{
Button novoBotao = new Button();
this.Controls.Add(novoBotao);
//valores do novo botão
novoBotao.Top = 20;
novoBotao.Left = 10;
novoBotao.Width = 35;
novoBotao.Height = 35;
novoBotao.Text=´ok´;
}
//abaixo mais dicas rapidas
//http://www.orkut.com/Community.aspx?cmm=22701441
Zap40
Curtir tópico
+ 0
Responder
Clique aqui para fazer login e interagir na Comunidade :)