Merge pull request #4543 from OmrSi/control-backspace

Return Control - Backspace for normal textbox
This commit is contained in:
Nikolaj Olsson 2020-11-30 07:36:10 +01:00 committed by GitHub
commit 1032df63d9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -156,6 +156,14 @@ namespace Nikse.SubtitleEdit.Controls
else
{
_textBox = new TextBox { BorderStyle = BorderStyle.None, Multiline = true };
_textBox.KeyDown += (sender, args) =>
{
if (args.KeyData == (Keys.Control | Keys.Back))
{
UiUtil.ApplyControlBackspace(_textBox);
args.SuppressKeyPress = true;
}
};
InitializeBackingControl(_textBox);
}