Add funcionallity to buttons of the widget