by Craig Shearer >> Fri, 4 Feb 2000 8:37:57 GMT
The TextBox control has a scrollHorizontal property that determines whether it should let the user enter more characters into the box when they've filled it up, irrespective of whether they've reached the maxLength limit of not.
This is a completely useless feature as more often than not, you forget to set the scrollHorizontal property to true, then a form that works fine with small fonts fails when the user sets large fonts and consequently there's not enough room in the textbox to type all they need to type. We recently had an application fail for this reason. We had a textbox that accepted a 4 digit year and we were tight on space so we'd sized the textbox to fit exactly 4 digits, forgetting that users sometimes have large fonts set. With large fonts set, the user could only type 3 digits, and this consequently failed our validation. (The comment at the time was that the feature could only have been designed by an ex-mainframe programmer - ouch!!!)
I know that we could subclass the TextBox control and change the setting of scrollHorizontal to true, but it is a trap that one can easily fall into.
Craig.