More a general question:
I have a form with an TEdit attached. I want to determine the Text value of the TEdit when an <Enter> key is pressed. The value returned will either be an integer or 'T' or 'F'. I don't have the code for this... it's in a prelim stage. I want to access the information from a procedure or function that may or may not reside in the form unit.
The generated procedure is of the form:
procedure TMain_ScreenF.AnswerEKeyPress(Sender: TObject; var Key: Char);
and I'll be testing it for (27 = ord(key)) and if (13 = ord(key)) as well as T/F; the number is generally an integer.
Is there a better way to do this? I'd like to have the coding in a separate procedure or function that could access the keys pressed.
Any suggestions?
Dik
I have a form with an TEdit attached. I want to determine the Text value of the TEdit when an <Enter> key is pressed. The value returned will either be an integer or 'T' or 'F'. I don't have the code for this... it's in a prelim stage. I want to access the information from a procedure or function that may or may not reside in the form unit.
The generated procedure is of the form:
procedure TMain_ScreenF.AnswerEKeyPress(Sender: TObject; var Key: Char);
and I'll be testing it for (27 = ord(key)) and if (13 = ord(key)) as well as T/F; the number is generally an integer.
Is there a better way to do this? I'd like to have the coding in a separate procedure or function that could access the keys pressed.
Any suggestions?
Dik