use considerations for FormGroup parts

In the context of EGL Text UI, a use statement that refers to a FormGroup part can appear in a Program part only. A use statement for a form group is required in these situations:

For information about use statements for form groups in a basicProgram type of Program part, see use.

When you specify a use statement for a form group, you can specify properties for the forms in that group. These properties let you change the behavior of the form group within a specific program, as you cannot override properties declared in a form at run time. Properties of the use statement for a form group override the properties of the form group, which in turn override the properties of an individual form within the group.

Within a form group, a use statement refers to a form that is specified outside any form group. This kind of statement allows multiple form groups to share the same form.

In some cases, your program must specify individual forms. For example, myFormGroup might have a formA and formB, each of which has a field named myField. You must specify one form or the other in your use statement if you later reference myField without a qualifier, as in the following:
set myField red;
For example, the following use statement makes it clear that the program sets myField in formB:
use myFormGroup.formB;
Note the typical dot syntax for qualification.

Syntax

Syntax diagram for a use statement with a form group
formGroupName
Name of a form group that is visible to the program. For an overview of form groups, see Introduction to FormGroup parts.
formName
An optional form within formGroupName.
formGroupProperties
You can specify properties for the form group(s) as part of the use statement. For details on available properties, see FormGroup properties.

Each name specified in the use statement can be qualified by a package name.

In a FormGroup part

In a FormGroup part, a use statement refers to a form that is specified outside any form group. This kind of statement allows multiple form groups to share the same form.

The syntax for a use statement in a FormGroup part is as follows:

Syntax diagram for a use statement in a FormGroup part
formName
Name of a standalone Form part that is visible to the form group. For an overview of forms, see Introduction to Form parts. You can qualify formName with a package name.

Feedback