Important: The information in this document is obsolete and should not be used for new development.
MyPanelValidateInput
A control panel extension must respond to thekPanelValidateInputSelectrequest code. A control panel sends this request code to your extension whenever the user clicks a control panel's close box. A control panel extension typically responds to thekPanelValidateInputSelectrequest code by calling an extension-defined subroutine (for example,MyPanelValidateInput) to handle the request.
FUNCTION MyPanelValidateInput (globals: Handle; VAR ok: Boolean) : ComponentResult;
globals- A handle to the control panel extension's global data.
ok- On return, a Boolean value that indicates whether the panel's current values are valid (
TRUE) or invalid (FALSE).DESCRIPTION
YourMyPanelValidateInputfunction should perform any processing necessary to validate the current settings in the panel. For example, if your panel contains any editable text items, you might need to ensure that the text they contain makes sense. The control panel calls this function when the user clicks the control panel's close box.If the current settings of the panel items are acceptable, set the
okparameter toTRUEbefore returning fromMyPanelValidateInput. If the current settings are not valid, setoktoFALSE. When you setoktoFALSE, the control panel ignores any of the user's subsequent clicks in the panel's OK button.RESULT CODES
YourMyPanelValidateInputfunction should returnnoErrif successful, or an appropriate result code otherwise.