Add click events for butttonBar to handle click on buttons