R
Ricky W. Hunt
Is there is a way to "change" what character the user typed? For instance,
is there anything I can put in a Keypress handler that if the user pressed
the <Enter> key it make it appear to the program that <Tab> was pressed? I'm
going through some tutorials that has a number validation routine (to ensure
only numbers were pressed, etc.) and it has a check to see if the <Enter>
key was pressed, and if so to set the focus to the next text box. Since
there's a bunch of these text boxes this code has to be copied into then
Keypress handler for each one. A subroutine won't work because the box you
want to transfer focus on depends on which box you are currently in. I
thought if I could make it appear to the program as though the user had
pressed Tab when they pressed Enter the cursor would jump to the correct box
(as set up by Tab order) and therefore I'd have a "universal" subroutine
that could be used for all the boxes.
is there anything I can put in a Keypress handler that if the user pressed
the <Enter> key it make it appear to the program that <Tab> was pressed? I'm
going through some tutorials that has a number validation routine (to ensure
only numbers were pressed, etc.) and it has a check to see if the <Enter>
key was pressed, and if so to set the focus to the next text box. Since
there's a bunch of these text boxes this code has to be copied into then
Keypress handler for each one. A subroutine won't work because the box you
want to transfer focus on depends on which box you are currently in. I
thought if I could make it appear to the program as though the user had
pressed Tab when they pressed Enter the cursor would jump to the correct box
(as set up by Tab order) and therefore I'd have a "universal" subroutine
that could be used for all the boxes.