I am working on a form with a number of input boxes. These are populated from a SQL database when the form is opened and can then be edited by the user before the database is updated with the changes.
The data to be entered can be a value from 0 to 99, or left blank. I tried using a Numeric Text Field, but this doesn’t allow a blank entry. I looked at using a Text Field, but this would require examining the key pressed and only allowing numeric or editing keys. It also allows any number of characters to be entered - the ‘Maximum Characters’ property only seems to be used to verify what the user entered when the focus moves to another control.
The Formatted Text Field seems similar in that it allows any data to be entered, then throws it away if it didn’t match the regular expression.
I would like to be able to restrict users to only pressing the appropriate keys and not exceeding the maximum length (in this case 2 characters).
Any ideas how to achieve this?