Luuk, et al,
We must make sure we differentiate betwixt "Text Box Width"--which is the specific question of the OP, and "Text Length"--which is always based on the number of characters.
Text Box Width is a physical measurement, which may differ based on OS Display settings. If we create a form that has a text box on it that is one inch wide (1440 twips), then that is a physical limitation of the text box. It is possible to overflow the size of a text box, at which point the text will not display properly.
Text Length is always an integer and is a count of the number of characters. I know you know this and fully understand the difference between these two, so I am not saying this to insult anyone's intelligence or competence....
It is possible to display a differing number of characters within the same text box. One could reduce the font size, and more characters could fit. One could use all skinny letters (e.g. "iiiiiiiiii" takes up less room than "wwwwwwwwww" with most font styles). Limiting the text box to the length of string to 10 characters will limit the amount of data that may be entered, but will not take into account either the size of the text box (a physical measurement) nor the size of the characters within the font set.
I do have some code which will calculate all this stuff (via another web site (sorry, Mods), but again--it is 100's of lines of code. I got mine to work for an experiment I was doing a while back, but have limited use for it right now.
If anyone is interested in this, I am glad to share--just not sure I remember all the tweaks needed to get it to work properly.