Text.setMaxLength

void setMaxLength(int length)

Sets the maximum allowed length of the contents of the widget.

If the current contents are longer than the given length, then they will be truncated to fit.

This is equivalent to getting self's [gtk.entry_buffer.EntryBuffer] and calling [gtk.entry_buffer.EntryBuffer.setMaxLength] on it.

Parameters

lengththe maximum length of the [gtk.text.Text], or 0 for no maximum. (other than the maximum length of entries.) The value passed in will be clamped to the range 0-65536.