A small suggestion
Posted: Tue Oct 30, 2007 3:46 pm
When editing a text box where a number is supposed to be, if you try deleting the entire old value before putting in a new value, it says "Please enter an integer" in a msgbox pop up.
I find this rather annoying, to have to enter at least part of the new value before deleting the last digit of the previous value.
Now, I'm assuming you're programming using event handlers here, where the "on change" event handler checks to ensure that the value is an integer, and if not, it pops up the msgbox.
If so, you could easily change it to check the "onlostfocus" event handler instead. That way, if the box is cleared, but still has focus, it won't pop up the error. It will only pop up the error if you clear the box and then tab or click out of the box. This allows the user to clear the previous value before entering a new one.
Basically, in that onlostfocus event handler, simply check if the value is an integer, if not, set focus back to the text box and pop up the error. If it is an integer, do nothing.
I find this rather annoying, to have to enter at least part of the new value before deleting the last digit of the previous value.
Now, I'm assuming you're programming using event handlers here, where the "on change" event handler checks to ensure that the value is an integer, and if not, it pops up the msgbox.
If so, you could easily change it to check the "onlostfocus" event handler instead. That way, if the box is cleared, but still has focus, it won't pop up the error. It will only pop up the error if you clear the box and then tab or click out of the box. This allows the user to clear the previous value before entering a new one.
Basically, in that onlostfocus event handler, simply check if the value is an integer, if not, set focus back to the text box and pop up the error. If it is an integer, do nothing.