PdfTextBoxField constructor

PdfTextBoxField(
  1. PdfPage page,
  2. String name,
  3. Rect bounds, {
  4. PdfFont? font,
  5. String? text,
  6. String? defaultValue,
  7. int maxLength = 0,
  8. bool spellCheck = false,
  9. bool insertSpaces = false,
  10. bool multiline = false,
  11. bool isPassword = false,
  12. bool scrollable = false,
  13. PdfTextAlignment alignment = PdfTextAlignment.left,
  14. PdfColor? borderColor,
  15. PdfColor? foreColor,
  16. PdfColor? backColor,
  17. int? borderWidth,
  18. PdfHighlightMode highlightMode = PdfHighlightMode.invert,
  19. PdfBorderStyle borderStyle = PdfBorderStyle.solid,
  20. String? tooltip,
})

Initializes a new instance of the PdfTextBoxField class with the provided page and name.

Implementation

PdfTextBoxField(PdfPage page, String name, Rect bounds,
    {PdfFont? font,
    String? text,
    String? defaultValue,
    int maxLength = 0,
    bool spellCheck = false,
    bool insertSpaces = false,
    bool multiline = false,
    bool isPassword = false,
    bool scrollable = false,
    PdfTextAlignment alignment = PdfTextAlignment.left,
    PdfColor? borderColor,
    PdfColor? foreColor,
    PdfColor? backColor,
    int? borderWidth,
    PdfHighlightMode highlightMode = PdfHighlightMode.invert,
    PdfBorderStyle borderStyle = PdfBorderStyle.solid,
    String? tooltip}) {
  _helper = PdfTextBoxFieldHelper(this);
  _helper.internal(page, name, bounds,
      font: font,
      alignment: alignment,
      borderColor: borderColor,
      foreColor: foreColor,
      backColor: backColor,
      borderWidth: borderWidth,
      highlightMode: highlightMode,
      borderStyle: borderStyle,
      tooltip: tooltip);
  this.font = font ?? PdfStandardFont(PdfFontFamily.helvetica, 8);
  _init(text, defaultValue, maxLength, spellCheck, insertSpaces, multiline,
      isPassword, scrollable);
  _helper.flags.add(FieldFlags.doNotSpellCheck);
  _helper.dictionary!.setProperty(
      PdfDictionaryProperties.ft, PdfName(PdfDictionaryProperties.tx));
}