Hi,
I have two components, a RichEdit which acts as a console, and an Edit which acts as input to the console.
What I want to be able to do is prompt for several pieces of information in the console (RichEdit), while providing the information through the input (Edit).
My problem is that I am unsure how to link the two components efficiently.
Obviously this is how I prompt for the Info
ConsoleRichEdit.Lines.Add('Enter Info:');
Now I need to wait for the input, because there are other prompts to come (they are all part of a procedure). So there has to be some sort of pause in the prompting procedure, while something else handles the input. This is what I'm most unsure about.
Putting the text in the Edit is easy enough, then I need to submit it. The enter key would be used for this, is the only way to use the OnKeyPress event, then test for enter?
Now I have to access that input from the other procedure. I could use the ConsoleEdit.Text variable.
I'm sure this has been done a million times before, and there's probably a standard way to do it. That's why I'm asking. Any comments are appreciated.
Thanks,
Pat
I have two components, a RichEdit which acts as a console, and an Edit which acts as input to the console.
What I want to be able to do is prompt for several pieces of information in the console (RichEdit), while providing the information through the input (Edit).
My problem is that I am unsure how to link the two components efficiently.
Obviously this is how I prompt for the Info
ConsoleRichEdit.Lines.Add('Enter Info:');
Now I need to wait for the input, because there are other prompts to come (they are all part of a procedure). So there has to be some sort of pause in the prompting procedure, while something else handles the input. This is what I'm most unsure about.
Putting the text in the Edit is easy enough, then I need to submit it. The enter key would be used for this, is the only way to use the OnKeyPress event, then test for enter?
Now I have to access that input from the other procedure. I could use the ConsoleEdit.Text variable.
I'm sure this has been done a million times before, and there's probably a standard way to do it. That's why I'm asking. Any comments are appreciated.
Thanks,
Pat