Update WidgetEvents Sample

Previous version was a quick and dirty one, and not one I'd like to see as a Sample!
This one is better style and works properly as well!
Merge pull request #324 from hwthomas/master

Update (and correct) WidgetEvents Sample