Is it possible to set a limit to the number of letters that can be entered in a textedit object? I would like to limit the max number to lets say 200 characters (spaces included) and show the number of remaining characters.
Unfortunately there are further special keys to take into account (such as enter/return) that are handled as entered characters in the above.
I'd favour a method where you count what's in the box each time (as the below). It suffers from slightly odd trailing whitespace issues (due to textedit stripping them from the output), but otherwise it should work, whatever is typed in.
The other issue arising in the above patch is that once you reach the limit you can't edit it any more.
The below also doesn't have a count down (but it's trivial - take the length away from the maximum - and you'll need to store the output and check for a tab or return character to send to the final output, but again that's fairly minor to add using zl reg or something...