D
D
Dominik092016-02-20 17:48:15
C++ / C#
Dominik09, 2016-02-20 17:48:15

How to ignore/block "replacement" mode via insert in RichTextBox?

It is necessary to make it so that when you press the insert key, the text in the RichTextBox is not replaced, but continues to "insert". How to do it?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Nemiro, 2016-02-20
@Dominik09

Add a KeyDown event handler to the richTextBox instance and cancel the Insert hit :

private void richTextBox1_KeyDown(object sender, KeyEventArgs e)
{
  if (e.KeyCode == Keys.Insert)
  {
    e.Handled = true;
    return;
  }
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question