Language Reference Guide : System Classes : CompositeField Class : ChildFields Attribute
 
Share this page          
ChildFields Attribute
Data Type: array of FormField
4GL Access: R
The ChildFields attribute contains an unordered array of the fields that make up the composite field.
You can use this array to access fields parented to the composite field, but not to change which fields are parented (for example applying the InsertRow, RemoveRow, SetRowDeleted or Clear methods to the ChildFields array will fail). To make such changes, set the individual fields' ParentField attribute; OpenROAD will then automatically modify the ChildFields array.
The order of the items in a ChildFields array can change in a number of circumstances, for example if you cut and repaste one of the childfields: 4GL code that assumes the items are in a particular sequence is unsupported.
For table fields, you should access immediate subcomponents (such as the TableBody and TableHeader StackFields) through the corresponding attributes of the table field. However you will find the ChildFields attribute very useful in stepping through the table's column fields to check or change the cell properties or displayed value:
for i = 1 to myTf.TableBody.ChildFields.LastRow do
    myNextCol = myTf.tableBody.ChildFields[i];
    … etc …
endfor;