【发布时间】:2012-11-23 19:06:58
【问题描述】:
我有以下代码:
private void richTextBox1_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.N)
{
richTextBox1.Select(1, 3);
}
}
当我按 N 键时,选定的文本将替换为“n”。我读了这个Selecting text in RichTexbox in C# deletes the text,但没有任何效果。
我正在使用 Windows 窗体。
【问题讨论】:
标签: c# winforms richtextbox keyevent