Pa dodaj mu "rucno" i event handler za Click
Code:
private void KreirajDugme()
{
Button btn = new Button();
btn.Click += new EventHandler(ObradiKlik);
Panel1.Controls.Add(btn);
// ako, recimo, imas panel na koji dodajes dugme...
}
private void ObradiKlik(object sender, EventArgs e)
{
// nesto se desi kada kliknes na dugme...
}
If it's a girl then they're gonna call it Sigourney, after an actress. If it's a boy, then they're gonna call it Rodney, after Dave!