set_max_length


Description:

public void set_max_length (int length)

Sets the maximum allowed length of the contents.

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

This is equivalent to getting this's `GtkEntryBuffer` and calling [method@Gtk.EntryBuffer.set_max_length] on it.

Parameters:

this

a text widget

length

the maximum length of the 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