Icon CreateField Method

function CreateField(Owner: TComponent; ParentField:
      TObjectField=nil; const FieldName: String=''; CreateChildren:
      Boolean=True): TField

Call the CreateField method to create an appropriate TField descendant component for the current field definition.

The only necessary parameter to this method is the Owner parameter, which is usually the form or data module that is creating the field components. The rest of the parameters can be left as the default values.
Image