[問題] 新增button後 要如何寫入新增button時所發生的事件
private void button1_Click(object sender, EventArgs e)
{
Button newButton = new Button();
newButton.Location = new Point(this.panel1.Left + 20 ,
this.panel1.Top - 20 );
panel1.Controls.Add(newButton);
}
我在button1寫入 新增一個button
目前會新增button
可是不清楚要怎麼動態寫入新增button在點擊時所發生的事情
麻煩各位先進指點
謝謝
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 114.46.199.161
→
11/29 09:25, , 1F
11/29 09:25, 1F
→
11/29 14:40, , 2F
11/29 14:40, 2F