- Execute a function to verify what the user typed is a legal value.
If the value is legal:- save the new value in a table;
- display an error message;
revert the text box contents to the original value.
- change the first box's text field background color to the default color (white);
move to the second box; and
change the second box's text field background color to "highlighted" (yellow).
My problem is that I don't know how to set up code to handle when the Tab key is pressed. When I press the Tab key, the cursor moves to the next field but of course it does not call my error-checking routine or save the field contents if they are correct. If I set wxTE_PROCESS_TAB, tab spaces get inserted into the wxTextCtrl box, which isn't what I want.
The only wxTextCtrl flag I have set is wxTE_PROCESS_ENTER.
What is the best way to set up code to run when the Tab key is pressed? By capturing the most recent key pressed? How do you do that?
I am using wxCrafter version 2.6 in CodeLite version 10.0.0.
Thanks.