Hiding Forms
- Last UpdatedOct 29, 2024
- 1 minute read
The recommended way for a form to be removed from the screen is for you to press a button with the OK or CANCEL attribute.
Forms may also be cancelled by using the close controls of the window. Both of these mechanisms will remove the form and any of its children executing their OK or CANCEL callbacks appropriately.
Sometimes it is required to hide a form and other forms which are functionally associated but not part of the form family or as a result of a button press on a form you may want to hide other associated forms but not the form whose button was pressed. The hide command or method allows this:
hide !!MyForm
!!MyForm.hide()
Note:
When you explicitly hide a form in this way its gadgets will be reset to their values
at display or at the last APPLY, just like a CANCEL action, but the CANCELCALL callbacks for the form and its nest will not be applied. This means that before you
execute the hide you should use any pertinent data from the forms to be hidden.