GTK2.Entry set_max_length(int maxlen)
Sets the maximum allowed length of the contents. If the current contents are longer than the given length, then they will be truncated to fit. Range is 0-65536. 0 means no maximum.