public override void KeyPressed(KeyEventArgs e) { if (!Focused) { return; } if (e.KeyCode == KeyCode.Backspace) { caret.ResetTimer(); if (Text.Length <= 0) { return; } OnTextChanged(EventArgs.Empty); Text = Text.Remove(Text.Length - 1, 1); caret.TextPosition--; UpdateOverflow(); return; } }