TRY NEW VERSION

Try now New API BETA

Try out the new view and capabilities of the API documentation

START

IsComb

IsComb() → { boolean }

Checks if the text field is a comb of characters with the same cell width.

Parameters:

This method doesn't have any parameters.

Returns:

Type
boolean

Example

Copy code
builder.CreateFile("docx");
var oDocument = Api.GetDocument();
var oTextForm = Api.CreateTextForm({"key": "Personal information", "tip": "Enter your first name", "required": true, "placeholder": "First name", "maxCharacters": 10, "multiLine": false, "autoFit": false});
var oParagraph = oDocument.GetElement(0);
oParagraph.AddElement(oTextForm);
oTextForm.SetComb(true);
var bComb = oTextForm.IsComb();
oParagraph = Api.CreateParagraph();
oParagraph.AddText("The first text form from this document is comb: " + bComb);
oDocument.Push(oParagraph);
builder.SaveFile("docx", "IsComb.docx");
builder.CloseFile();

Resulting document