PdfButtonField constructor
PdfButtonField(
- PdfPage page,
- String name,
- Rect bounds, {
- String? text,
- PdfFont? font,
- PdfColor? borderColor,
- PdfColor? backColor,
- PdfColor? foreColor,
- int? borderWidth,
- PdfHighlightMode highlightMode = PdfHighlightMode.invert,
- PdfBorderStyle borderStyle = PdfBorderStyle.solid,
- PdfFieldActions? actions,
- String? tooltip,
Initializes an instance of the PdfButtonField class with the specific page, name, and bounds.
Implementation
PdfButtonField(PdfPage page, String name, Rect bounds,
{String? text,
PdfFont? font,
PdfColor? borderColor,
PdfColor? backColor,
PdfColor? foreColor,
int? borderWidth,
PdfHighlightMode highlightMode = PdfHighlightMode.invert,
PdfBorderStyle borderStyle = PdfBorderStyle.solid,
PdfFieldActions? actions,
String? tooltip}) {
_helper = PdfButtonFieldHelper(this);
_helper.internal(page, name, bounds,
tooltip: tooltip,
font: font,
borderColor: borderColor,
backColor: backColor,
foreColor: foreColor,
borderWidth: borderWidth,
highlightMode: highlightMode,
borderStyle: borderStyle);
_helper.dictionary!.setProperty(
PdfDictionaryProperties.ft, PdfName(PdfDictionaryProperties.btn));
if (backColor == null) {
_helper.backColor = PdfColor(211, 211, 211);
}
_helper.flags.add(FieldFlags.pushButton);
_helper.initValues(text, actions);
}