Represents a subform in a form. The subform itself is represented by a hk_form object returned by the subform() function.
Inherits from hk_dsvisible.
- set_name(subformname [,registerchange])
- name()
returns the name of the subform
- subform()
returns the form object of type hk_form that will internally be used to display the subform
- add_depending_fields( subfield,masterfield [,registerchange])
'subfield' is the fieldname of a column of the main subform-datasource which has to be connected to the main datasource of the master form.
'masterfield' is the columnname of the main masterform-datasource which value has to be equal with the value of subfield.
'registerchange' if this class is part of a hk_presentation object (i.e. a form or a report) and registerchange *is true, then the changes will be stored when the hk_presentation object is closed.
- clear_depending_fields([registerchange])
clears the list of fields set with add_depending_fields
- activate_subform()
when the subform is set during runtime, the subform will be loaded and displayed when calling this function
Example 2.13. Loading a subform
subform=hk_thisform.get_pyvisible("mysubform") subform.clear_depending_fields() subform.add_depending_fields("subfield","masterfield",False) subform.set_name("Subformname") subform.activate_subform()