How can I return the contents of a TextBox when its KeyDown event is fired? I want to make a Console.ReadLine() equivalent. So for example:
Write("Hi! Enter your name...");
Write(ReadFromTextBox());
Is this possible?
How can I return the contents of a TextBox when its KeyDown event is fired? I want to make a Console.ReadLine() equivalent. So for example:
Write("Hi! Enter your name...");
Write(ReadFromTextBox());
Is this possible?
You can use the textChanged event.
And if you want to read only after the user presses enter: