| The Form class / ui.Form methods | |
Define the default initializer for all forms.
ui.Form.setDefaultInitializer( funcname STRING )
Specify a default initialization function with the ui.Form.setDefaultInitializer() method, to implement global processing when a form is opened.
The method takes the name of the initialization function as a parameter.
When a form is loaded with OPEN FORM / DISPLAY FORM or with OPEN WINDOW ... WITH FORM, the initialization function will be called with a ui.Form object as a parameter.
MAIN
...
CALL ui.Form.setDefaultInitializer("form_init")
...
OPEN FORM f1 FROM "customers"
DISPLAY FORM f1 -- initialization function is called
...
END MAIN
FUNCTION form_init(f)
DEFINE f ui.Form
CALL f.loadToolBar("common_toolbar")
END FUNCTION