Add event handler for pressing the Measure button.