Click or drag to resize

PdfPushButtonControl Constructor

Create a new push button control and assign it to the specified field.

Namespace: Patagames.Pdf.Net.AcroForms
Assembly: Patagames.Pdf (in Patagames.Pdf.dll) Version: 4.89.2704
Syntax
public PdfPushButtonControl(
	PdfPushButtonField field,
	PdfPage page,
	FS_RECTF rect,
	string caption,
	PdfAction action = null,
	FS_COLOR? borderColor = null,
	FS_COLOR? backgroundColor = null,
	FS_COLOR? captionColor = null,
	PdfFont font = null,
	float? fontSize = 0f,
	PdfBitmap icon = null,
	FormHighlightingMode highlightingMode = FormHighlightingMode.Push,
	TextPositions captionPos = TextPositions.TEXTPOS_CAPTION,
	IconScaleModes iconMode = IconScaleModes.Always,
	IconScaleTypes iconScale = IconScaleTypes.Proportional,
	float horizontalOffset = 0.5f,
	float verticalOffset = 0.5f,
	bool fitToBounds = false,
	PageRotate rotation = PageRotate.Normal,
	float borderWidth = 1f,
	BorderStyles borderStyle = BorderStyles.Solid,
	float[] dashPattern = null
)

Parameters

field  PdfPushButtonField
The field to which this control is assigned./>
page  PdfPage
The page that will host this control.
rect  FS_RECTF
The area on the page where this control should be placed.
caption  String
The pushbutton controls’s caption.
action  PdfAction  (Optional)
An action to be performed when the button is clicked.
borderColor  NullableFS_COLOR  (Optional)
The color of the pushbutton control’s border.
backgroundColor  NullableFS_COLOR  (Optional)
The color of the pushbutton control’s background.
captionColor  NullableFS_COLOR  (Optional)
The color of the pushbutton control’s caption.
font  PdfFont  (Optional)
The font used for drawing caption.
fontSize  NullableSingle  (Optional)
The font's size.
icon  PdfBitmap  (Optional)
The pushbutton controls’s icon.
highlightingMode  FormHighlightingMode  (Optional)
The control’s highlighting mode, the visual effect to be used when the mouse button is pressed or held down inside its active area.
captionPos  TextPositions  (Optional)
A TextPositions enumeration indicating where to position the text of the pushbutton control’s caption relative to its icon.
iconMode  IconScaleModes  (Optional)
The circumstances under which the icon should be scaled inside the control rectangle.
iconScale  IconScaleTypes  (Optional)
The type of scaling to use.
horizontalOffset  Single  (Optional)
The number between 0.0 and 1.0 indicating the fraction of leftover space to allocate at the bottom of the icon. A value of 0.0 positions the icon at the bottom corner of the control rectangle. A value of 0.5 centers it within the horizontal direction of rectangle. Is used only if the iconScale is Proportional.
verticalOffset  Single  (Optional)
The number between 0.0 and 1.0 indicating the fraction of leftover space to allocate at the left of the icon. A value of 0.0 positions the icon at the left corner of the control rectangle. A value of 0.5 centers it within the vertical direction of rectangle. Is used only if the iconScale is Proportional.
fitToBounds  Boolean  (Optional)
A value indicating that the button appearance should be scaled to fit fully within the bounds of the annotation without taking into consideration the line width of the border.
rotation  PageRotate  (Optional)
A value indicating how the pushbutton control is rotated counterclockwise relative to the page.
borderWidth  Single  (Optional)
The border width in points.
borderStyle  BorderStyles  (Optional)
The border style.
dashPattern  Single  (Optional)
An array defining a pattern of dashes and gaps to be used in drawing a dashed border. The dash array is specified in the same format as in the line dash pattern parameter of the graphics state. The dash phase is not specified and is assumed to be 0. For example, a DashPattern property of[3 2] specifies a border drawn with 3-point dashes alternating with 2-point gaps.
See Also