SetFormFieldIcon

表单字段

描述

设置按钮表单字段的图标。要创建图标:向文档添加新页面,设置大小并在页面上绘制图像或文本,然后使用 CapturePage 函数捕获该页面。要正确显示 "按下" 或 "悬停" 图标,必须将表单字段'的高亮模式设为 "推送",请参阅 SetFormFieldHighlightMode 函数

语法

Delphi

Function TPDFlib.SetFormFieldIcon(Index, IconType, CaptureID: Integer): Integer;

ActiveX

Function PDFlib::SetFormFieldIcon(Index As Long, IconType As Long, CaptureID As Long) As Long

DLL

int DLSetFormFieldIcon(int InstanceID, int Index, int IconType, int CaptureID);

参数

Index表单字段的索引
IconType要分配的图标类型:0 = 普通图标 1 = 鼠标悬停图标 2 = 按下图标
CaptureIDCapturePage 函数返回的 ID

返回值

0找不到表单字段或参数无效
1已成功设置表单字段的指定图标