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.
The difference with set_max_length is that the max length does not take into account the prefix and/or suffix parts which may have been set.
this |
a Entry. |
max |
the maximum length of the entry, or 0 for no maximum. |