Event handled for each button

TextCtrl crashes when calling method outside of main function.
Need to check that around ~"Stale reference"