Hi, I need custom behavior for tab keys in RichTextEdit control.
Currenty the best I have is this:
editBox.PreviewKeyDown += new System.Windows.Forms.PreviewKeyDownEventHandler(this.field_PreviewKeyPress);
private void field_PreviewKeyPress(object sender, PreviewKeyDownEventArgs e)
{
switch (e.KeyCode)
{
case Keys.Tab:
//Some code here
break;
}
}
The tab key is registered fine, but after that the control processes the key anyway and moves the focus to next control. There seems no way to consume this key event.