跳到主要内容

GetTooltip

获取字段工具提示

备注

此功能仅在 ONLYOFFICE Docs 付费版本中可用。

继承自 ApiBaseField.GetTooltip。

语法​

expression.GetTooltip();

expression - 表示 ApiCheckboxField 类的变量。

参数​

此方法没有任何参数。

返回值​

boolean

示例​

读取 PDF 中表单字段的工具提示。

// Useful for getting the helper text assigned to a field.

// Set a field tooltip and read it back.

let doc = Api.GetDocument();
let page = doc.GetPage(0);
let textField = Api.CreateTextField([10, 10, 160, 30]);
page.AddObject(textField);

textField.SetTooltip("Enter your full name");
textField.SetValue(textField.GetTooltip());