Topics   All   MacOS (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server   Client   Old   Guides   Examples
New in version: 9.0   9.1   9.2   9.3   9.4   9.5   10.0   10.1   10.2   10.3    Statistic  

DynaPDF.AddButtonImage

Add/Set a form field button image.

Component Version macOS Windows Server FileMaker Cloud FileMaker iOS SDK
DynaPDF 10.2 Yes Yes Yes Yes Yes
MBS( "DynaPDF.AddButtonImage"; PDF; Field; Button State; Image File Path )   More

Parameters

Parameter Description Example value
PDF The PDF reference returned from DynaPDF.New. $pdf
Field The field index or field name. "FirstName"
Button State The state of the button.
Can be "Up", "Down" or "RollOver".
"Up"
Image File Path The native file path for the image file. "C:\test\picture.png"

Result

Returns OK or error.

Description

Add/Set a form field button image.
Adds an image to a push button to one or more of the three different states of a button. The parameter Field must be handle of a button field that was returned by a DynaPDF.CreateButton function call or the index of an existing field of type button.
The parameter State defines the button state in which the image should appear. Each state is optional; it is possible to add different images to all three states of the button. The rollover state should get a different image than the other states. If two states should get the same image, the image is physically inserted only once to the PDF file.
DynaPDF checks whether duplicate images are already available before inserting an image again. Depending on the parameter UseTransparency (see DynaPDF.SetUseTransparency) the image appears with a transparent background or opaque (default transparent). However, note that the background of the button must be transparent too to get a transparent button. Otherwise the button is still opaque due the opaque background of the button.
The parameter Caption is optional, it can be empty. Each state can contain its own caption which is drawn horizontally and vertically centered by default. The alignment can be changed with the function SetFieldTextAlign(). Because each button state is directly drawn when calling the function, the alignment must be set before this function is called.
If a button has already an image for a specific button state, the existing image will be replaced with the new one.

See also AddButtonImage function in DynaPDF manual.

See also

Blog Entries

Release notes

Created 17th April 2020, last changed 17th April 2020


DynaPDF.AddBookmarkEx   -   DynaPDF.AddContinueText

Feedback: Report problem or ask question.




Links
MBS FileMaker Plugins