P
Przemyslaw Lopaciuk
I want to make RichTextBox very similar to Windows Command Prompt (cmd.exe).
It means that I need that nobody can delete the prompt and move cursor in
window except in the same line.
I use the following code:
if (e->KeyCode == Keys::Enter && connection == NULL ){
NetPromptBox->SelectAll();
NetPromptBox->SelectionProtected = false;
NetPromptBox->Text =
String::Concat(NetPromptBox->Text,S"\r\nSERVER>> ");
NetPromptBox->SelectAll();
NetPromptBox->SelectionProtected = true;
NetPromptBox->SelectionLength = 0;
NetPromptBox->SelectionStart = NetPromptBox->TextLength+1;
}
The problem is that user can still go up and down in window and the cursor
after you press ENTER is not in the same line as SERVER>> but in next one.
Could anybody help me please?
Thank you,
Przemyslaw Lopaciuk
It means that I need that nobody can delete the prompt and move cursor in
window except in the same line.
I use the following code:
if (e->KeyCode == Keys::Enter && connection == NULL ){
NetPromptBox->SelectAll();
NetPromptBox->SelectionProtected = false;
NetPromptBox->Text =
String::Concat(NetPromptBox->Text,S"\r\nSERVER>> ");
NetPromptBox->SelectAll();
NetPromptBox->SelectionProtected = true;
NetPromptBox->SelectionLength = 0;
NetPromptBox->SelectionStart = NetPromptBox->TextLength+1;
}
The problem is that user can still go up and down in window and the cursor
after you press ENTER is not in the same line as SERVER>> but in next one.
Could anybody help me please?
Thank you,
Przemyslaw Lopaciuk