Available for: UI for ASP.NET MVC | UI for ASP.NET AJAX | UI for Blazor | UI for WPF | UI for WinForms | UI for Silverlight | UI for Xamarin | UI for WinUI | UI for ASP.NET Core | UI for .NET MAUI

New to Telerik Document Processing? Download free 30-day trial

CombTextBoxField class

This article describes the following topics:

Overview

This class corresponds to FormFieldType.CombTextBox enum value and represents a text input data container which restricts its text to some specific length and the characters are equally distributed through the field appearance length.

Properties

CombTextBoxField provides the following properties:

  • 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 which represent the field on the PDF pages. The widgets are created by using the collection's AddWidget() method and can be removed by using the Remove() method. As the widget collection implements the IEnumerable interface, the available widget instances can be iterated.

  • MaxLengthOfInputCharacters: Integer value specifying the number of characters that can be inputted.

Example 1: Create a CombTextBoxField and add it to a page

CombTextBoxField combTextBoxField = new CombTextBoxField("SampleCombTextBox") 
{ 
    MaxLengthOfInputCharacters = 4, 
    DefaultValue = "2017", 
    Value = "2017", 
}; 
 
VariableContentWidget widget = combTextBoxField.Widgets.AddWidget(); 
widget.Rect = new Rect(new Size(250, 50)); 
widget.RecalculateContent(); 
 
document.AcroForm.FormFields.Add(combTextBoxField); 
document.Pages[0].Annotations.Add(widget); 

See Also

In this article