Leggi il mio post poco sopra, nell'esempio c'è anche spiegato come aggiungere i gestori di eventi.