maxLength property

int get maxLength

Gets or sets the maximum number of characters that can be entered in the text box.

The default value is 0.

Implementation

int get maxLength {
  if (_helper.isLoadedField) {
    final IPdfPrimitive? number = PdfFieldHelper.getValue(_helper.dictionary!,
        _helper.crossTable, PdfDictionaryProperties.maxLen, true);
    if (number != null && number is PdfNumber) {
      _maxLength = number.value!.toInt();
    }
  }
  return _maxLength;
}
set maxLength (int value)

Implementation

set maxLength(int value) {
  if (maxLength != value) {
    _maxLength = value;
    _helper.dictionary!.setNumber(PdfDictionaryProperties.maxLen, _maxLength);
    if (_helper.isLoadedField) {
      _helper.changed = true;
    }
  }
}