THotPDF.SetFormFieldTooltip Method
Assigns the PDF /TU user hint for an AcroForm field that was already created in the current document
Declaration
procedure SetFormFieldTooltip(const FieldName, Value: AnsiString);
Unit
HPDFDoc
Parameters
| Name | Purpose |
|---|---|
FieldName | Existing AcroForm field name to find in the generated field list |
Value | Text written to the field dictionary as the /TU user hint |
Usage notes
- Call this method after creating the target field and before
EndDoc - The method is useful when code uses
THPDFPage.AddTextField,AddCheckBox,AddRadioButton,AddComboBox, orAddListBoxinstead of the wrapper-returningCreate...helpers - For wrapper-based code, use
THPDFAcroFormField.SetTooltipto configure the field directly from the returned wrapper - 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;