New to Telerik Document Processing? Start a free 30-day trial
CombTextBoxField Class
Updated on Jun 3, 2026
The CombTextBoxField class corresponds to the FormFieldType.CombTextBox enum value and represents a text input data container. It restricts text to a specific maximum length and distributes characters equally across the field appearance.
Properties
CombTextBoxField provides the following properties:
| Property | Description |
|---|---|
Value | Gets or sets the current text value of the field. |
DefaultValue | Gets or sets the default value used when the AcroForm is reset to its default values. |
Widgets | The collection of Widget annotations representing the field on the PDF pages. Widgets are created with AddWidget() and can be removed with Remove(). Implements IEnumerable. |
MaxLengthOfInputCharacters | Specifies the number of characters that can be entered. |
Example 1: Create a CombTextBoxField and add it to a page
C#
CombTextBoxField combTextBoxField = new CombTextBoxField("SampleCombTextBox")
{
MaxLengthOfInputCharacters = 4,
DefaultValue = "2017",
Value = "2017",
};
VariableContentWidget widget = combTextBoxField.Widgets.AddWidget();
widget.Rect = new Rect(0, 0, 250, 50);
widget.RecalculateContent();
document.AcroForm.FormFields.Add(combTextBoxField);
document.Pages[0].Annotations.Add(widget);