A
A
Amarg02015-09-22 23:00:19
Programming
Amarg0, 2015-09-22 23:00:19

How to output text to the console that can be edited?

Let me explain.
The task is to display the text with the possibility of editing.
For example, I display on the screen:
Name - Alexander
"Alexander" can be edited and later read from the screen.
How can this be implemented?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vladimir Martyanov, 2015-09-22
@vilgeforce

Hehe, that's going to be fun. I immediately see this solution: you need to catch keystrokes, if it is a regular character - add it to the buffer and display it on the screen. If it's a backspace, delete the last character from the buffer and display "\b" to overwrite the last character printed. Accordingly, at the moment Enter is pressed, nothing needs to be read from the screen, it is enough to take it from the buffer.

A
Alexander Taratin, 2015-09-22
@Taraflex

www.codeproject.com/Articles/15086/Forms-for-Conso...
www.mono-project.com/docs/tools+libraries/librarie...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question