Connect signal when creating buttons.