2.2.2 Inheritance

Forms and reusable parts have a property called Ancestor. It is used to select the component from which this component inherits from.

By default all forms inherit from #PRIM_FORM which is the elementary Visual LANSA form. #PRIM_FORM cannot be modified. However, you can specify any other form as the ancestor of a form.

The inheriting form will look exactly like its ancestor form: it inherits all the components of its ancestor form. If you make changes to the ancestor form, these changes are reflected in the inheriting form.

You can change the properties of the inherited form and its components. When you change the property of an inherited component, it permanently overrides the original value. So for example if the form has an ancestor form which contains a push button with the caption 'Save' and you change this to 'Save Changes' on the inheriting form, this caption will not change when you change the caption of the button on the ancestor form.

By default reusable parts inherit from #PRIM_PANL, a panel on which you can put other components (or reusable parts). You can make any Visual LANSA control, such as a button, tab folder, tree view etc. the ancestor of a reusable part. You can also use one reusable part as the ancestor of another reusable part.