public override bool OnKeyPress(KeyPressEventArgs e) { if (Enabled && !ReadOnly && IsInputChar(e.KeyChar)) { //if (e.KeyChar == ' ' || e.KeyChar == '\n') SetUndoInsert(e.KeyChar.ToString()); if (SelLength > 0) { DeleteSelection(); SelLength = 0; } RowManager.InsertChar(e.KeyChar); SelStart = RowManager.CursorPosition; EnsureCurrentRowVisible(); CursorOn = true; Invalidate(); return(true); } return(base.OnKeyPress(e)); }