THotPDF.SetFormFieldTooltip Method
为当前文档中已创建的 AcroForm 字段设置 PDF /TU 用户提示
声明
procedure SetFormFieldTooltip(const FieldName, Value: AnsiString);
单元
HPDFDoc
参数
| 名称 | 用途 |
|---|---|
FieldName | Existing AcroForm field name to find in the generated field list |
Value | 作为 /TU 用户提示写入字段字典的文本 |
使用说明
- 在创建目标字段之后、
EndDoc之前调用该方法 - 当代码使用
THPDFPage.AddTextField、AddCheckBox、AddRadioButton、AddComboBox或AddListBox而不是返回包装器的Create...辅助方法时,该方法会派上用场 - 基于包装器的代码可直接用
THPDFAcroFormField.SetTooltip配置返回的包装器所对应的字段 - An unknown field name raises the same field lookup exception used by the form-field additional-action helpers
Example
HPDF.BeginDoc;
HPDF.AddPage;
HPDF.CurrentPage.AddTextField('CustomerName', '', Rect(50, 100, 250, 120));
HPDF.SetFormFieldTooltip('CustomerName', 'Customer name');
HPDF.EndDoc;
Related API
- AcroFormSupport
- THotPDFSetFormFieldAdditionalActionMethod
- THotPDFFormFieldActionConvenienceMethods