Add Method
- Namespace
TXTextControl
- Package
TXTextControl.asTextControl. WinForms. SDK TXTextControl.from the private NuGet feed or Text Control Offline Packagesdll
Description
Inserts the specified form field at the current input position.
Syntax
public bool Add(FormField formField);Public Function Add(formField As FormField) As BooleanParameters
| Parameter | Description |
|---|---|
| formField | Specifies the form field to add. |
Return Value
The return value is true, if the form field could be added. Otherwise it is false.
Examples
The following example works with form fields in the current document by using FormFieldCollection.Add.
textControl.Text = "Customer: Contoso Ltd.";
textControl.Select(10, 12);
FormFieldCollection formFieldCollection = textControl.FormFields;
if (!formFieldCollection.Add(new TXTextControl.CheckFormField(true)))
{
throw new InvalidOperationException("The item could not be inserted.");
}textControl.Text = "Customer: Contoso Ltd."
textControl.Select(10, 12)
Dim formFieldCollection As FormFieldCollection = textControl.FormFields
If Not formFieldCollection.Add(New TXTextControl.CheckFormField(True)) Then
Throw New InvalidOperationException("The item could not be inserted.")
End If