Programming Guide : 14. Creating a Frame at Runtime : How You Can Build a Frame Dynamically : How You Can Attach Fields to the Form
 
Share this page                  
How You Can Attach Fields to the Form
After a field is constructed, attach the field to the form by setting the field's ParentField attribute. The data type of ParentField is CompositeField. Setting a field's ParentField attribute to the name of a reference variable, pointing to a form, attaches the field to that form.
For example, the following statement attaches the field represented by field_ptr to the form represented by test_frame.TopForm:
field_ptr.ParentField = test_frame.TopForm;
The preceding statement says that the parent field of the field identified by field_ptr is the form identified by test_frame.TopForm.