mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-21 09:58:13 +00:00
FIX: Close edit comment dialog by Escape key
This commit is contained in:
parent
8d59fa8a61
commit
46cfdc4066
2 changed files with 9 additions and 1 deletions
|
|
@ -68,6 +68,7 @@ object frmDescrEdit: TfrmDescrEdit
|
|||
BorderSpacing.Top = 8
|
||||
BorderSpacing.Right = 12
|
||||
BorderSpacing.Bottom = 12
|
||||
OnKeyDown = memDescrKeyDown
|
||||
TabOrder = 0
|
||||
end
|
||||
object cbEncoding: TComboBox
|
||||
|
|
|
|||
|
|
@ -47,6 +47,7 @@ type
|
|||
procedure actExecute(Sender: TObject);
|
||||
procedure cbEncodingChange(Sender: TObject);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure memDescrKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
|
||||
private
|
||||
FDescr: TDescription;
|
||||
FCommands: TFormCommands;
|
||||
|
|
@ -65,7 +66,7 @@ implementation
|
|||
{$R *.lfm}
|
||||
|
||||
uses
|
||||
LConvEncoding, DCStrUtils, uHotkeyManager, uLng, uGlobs;
|
||||
LCLType, LConvEncoding, DCStrUtils, uHotkeyManager, uLng, uGlobs;
|
||||
|
||||
const
|
||||
HotkeysCategory = 'Edit Comment Dialog';
|
||||
|
|
@ -111,6 +112,12 @@ begin
|
|||
btnOK.Caption := btnOK.Caption + ' (' + ShortcutsToText(Hotkey.Shortcuts) + ')';
|
||||
end;
|
||||
|
||||
procedure TfrmDescrEdit.memDescrKeyDown(Sender: TObject; var Key: Word;
|
||||
Shift: TShiftState);
|
||||
begin
|
||||
if Key = VK_ESCAPE then ModalResult:= btnCancel.ModalResult;
|
||||
end;
|
||||
|
||||
procedure TfrmDescrEdit.DisplayEncoding;
|
||||
var
|
||||
I: Integer;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue