SetFormFieldIcon

Form fields

Description

Sets the icon of a button form field. To create an icon: add a new page to the document, set the size and draw images or text onto the page, and then capture the page using the CapturePage function. For a "down" or "rollover" icon to be displayed correctly the form field's hightlight mode must be set to "push", see the SetFormFieldHighlightMode function.

Syntax

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);

Parameters

IndexThe index of the form field
IconTypeThe type of icon to assign: 0 = Normal icon 1 = Rollover icon 2 = Down icon
CaptureIDThe ID returned by the CapturePage function

Return values

0The form field could not be found or the parameters were invalid
1The specified icon of the form field was set successfully