IsComb
检查文本字段是否为具有相同单元格宽度的字符梳。
语法
expression.IsComb();
expression - 表示 ApiTextForm 类的变量。
参数
此方法没有任何参数。
返回值
boolean
示例
检查文档中的文本字段是否将输入拆分为等距单元格。
// How do I determine if a text field uses a comb layout for its characters in a document?
// Verify that equal-width character cells are active on a text field in a document.
let doc = Api.GetDocument();
let textForm = Api.CreateTextForm({"key": "Personal information", "tip": "Enter your first name", "required": true, "placeholder": "First name", "maxCharacters": 10, "multiLine": false, "autoFit": false});
let paragraph = doc.GetElement(0);
paragraph.AddElement(textForm);
textForm.SetComb(true);
let comb = textForm.IsComb();
paragraph = Api.CreateParagraph();
paragraph.AddText("The first text form from this document is comb: " + comb);
doc.Push(paragraph);