Support for callbacks when the OK button is pressed