Workbench User Guide : 6. Creating and Using Basic Fields : Composite Fields : Create a Subform
 
Share this page                  
Create a Subform
A subform appears as a group of fields that are contained by a fixed boundary on a form. You determine the boundary size when you create the subform. The fields within the subform can be of any type. You can group existing fields into a subform or you can create a new subform.
To create a subform with existing fields
1. Open your frame in the Frame Editor (see Open an Existing Frame).
2. Select the fields to be grouped as a subform.
3. Click Group, Subform.
A composite subform field is created.
For complete descriptions of each field property, see Subform Properties and Common Field Properties.
To create a new subform
1. Open your frame in the Frame Editor (see Open an Existing Frame).
2. Click Insert, Field, SubForm.
3. Position and size the field on the form.
4. Add fields to the subform.
For complete descriptions of each field property, see Subform Properties and Common Field Properties.
Subform Properties
All the properties for subforms are described under Common Field Properties, with the exception of the following property values that are specific to the subform field type:
ChildGravity
Sets the position of each child field with respect to the subform. Valid alignment options are:
FA_DEFAULT (system default value)
FA_NONE
FA_TOPCENTER
FA_TOPLEFT
FA_TOPRIGHT
FA_CENTERLEFT
FA_CENTER
FA_CENTERRIGHT
FA_BOTTOMCENTER
FA_BOTTOMLEFT
FA_BOTTOMRIGHT
Unless the subform has only one child field, set ChildGravity to FA_NONE. To set the position of a child field relative to the subform, use the Gravity property of the individual child fields. You can also use the various alignment commands on the Layout menu to align child fields with respect to one another.
Note:  For more information about the Gravity and ChildGravity properties, see the Gravity section under Common Field Properties.