SetFormFieldIconStyle

Form fields

Description

Sets the position, scaling and layout of a button form field's icon. These parameters apply to all the icons assigned to a button (up, down and rollover).

Syntax

Delphi

function TPDFlib.SetFormFieldIconStyle(Index, Placement, Scale, ScaleType, HorizontalShift, VerticalShift: Integer): Integer;

ActiveX

Function PDFlib::SetFormFieldIconStyle(Index As Long, Placement As Long, Scale As Long, ScaleType As Long, HorizontalShift As Long, VerticalShift As Long) As Long

DLL

int DLSetFormFieldIconStyle(int InstanceID, int Index, int Placement, int Scale, int ScaleType, int HorizontalShift, int VerticalShift);

Parameters

IndexThe index of the form field
PlacementThe icon placement: 0 = No icon; caption only 1 = No caption; icon only 2 = Caption below the icon 3 = Caption above the icon 4 = Caption to the right of the icon 5 = Caption to the left of the icon 6 = Caption overlaid directly on the icon The conditions under which to scale the icon: 0 = Always scale 1 = Only scale when the icon is bigger than the button 2 = Only scale when the icon is smaller than the button 3 = Never scale
Scale
ScaleTypeThe type of scaling to use: 0 = Ignore aspect ratio 1 = Maintain aspect ratio
HorizontalShiftThe percentage of space placed to the left of the icon, for example: 0 = Align left 50 = Center horizontally 100 = Align right
VerticalShiftThe percentage of space placed beneath the icon, for example: 0 = Align bottom 50 = Center vertically 100 = Align top

Return values

0The form field could not be found or the parameters were invalid
1The icon style of the form field was set successfully int VerticalShift);