Event handlers and packing of widgets