Hi,
Is there a way to set the limit on the length of string control in number of bytes? I have a string control whose length is always going to be 3 bytes and I don't want the user to accidentally enter more bytes.
What I have done right now is have a value change event on the string and display only the 1st 3 bytes whenever the value change event occurs but I want to know if there is any direct way to set the limit on the number of bytes on the string control.
Thanks,
Ritesh
Solved! Go to Solution.
Did you set the "update while typing" property to True so that you can delete extra characters immediately after they are added instead of after people type for a while?
Apart from doing that I don't know of a way, though.
And go give this idea a kudo: Option to Limit the Number of Characters in a String Control
Another related idea would be to have a fixed lenght string datatype as described in this idea. ![]()
Thanks everyone!
I am already using "String value change" event to capture the change and then displaying only the 1st 3 bytes, but altenbach's answer is more elegant that it doesn't allow keystrokes event if the number of bytes have already reached the limit, so I accepted that as a solution.
I was only hoping to find a direct property of a string control to limit the number of bytes. It seems like the rquest has been submitted mutiple times so I did my part and kudoed those requests.