PdfComboBoxField constructor

PdfComboBoxField(
  1. PdfPage page,
  2. String name,
  3. Rect bounds, {
  4. List<PdfListFieldItem>? items,
  5. bool editable = false,
  6. int? selectedIndex,
  7. String? selectedValue,
  8. PdfFont? font,
  9. PdfTextAlignment alignment = PdfTextAlignment.left,
  10. PdfColor? borderColor,
  11. PdfColor? foreColor,
  12. PdfColor? backColor,
  13. int? borderWidth,
  14. PdfHighlightMode highlightMode = PdfHighlightMode.invert,
  15. PdfBorderStyle borderStyle = PdfBorderStyle.solid,
  16. String? tooltip,
})

Initializes a new instance of the PdfComboBoxField class with the specific page, name and bounds.

Implementation

PdfComboBoxField(PdfPage page, String name, Rect bounds,
    {List<PdfListFieldItem>? items,
    bool editable = false,
    int? selectedIndex,
    String? selectedValue,
    PdfFont? font,
    PdfTextAlignment alignment = PdfTextAlignment.left,
    PdfColor? borderColor,
    PdfColor? foreColor,
    PdfColor? backColor,
    int? borderWidth,
    PdfHighlightMode highlightMode = PdfHighlightMode.invert,
    PdfBorderStyle borderStyle = PdfBorderStyle.solid,
    String? tooltip}) {
  _helper = PdfComboBoxFieldHelper(this);
  _helper.initializeInternal(page, name, bounds,
      font: font,
      alignment: alignment,
      items: items,
      borderColor: borderColor,
      foreColor: foreColor,
      backColor: backColor,
      borderWidth: borderWidth,
      highlightMode: highlightMode,
      borderStyle: borderStyle,
      tooltip: tooltip);
  _helper.flags.add(FieldFlags.combo);
  this.editable = editable;
  if (selectedIndex != null) {
    this.selectedIndex = selectedIndex;
  }
  if (selectedValue != null) {
    this.selectedValue = selectedValue;
  }
}