FIX: F2 hotkey in edit description dialog

This commit is contained in:
Alexander Koblov 2015-12-14 18:12:38 +00:00
commit 7b93cdad74
2 changed files with 26 additions and 19 deletions

View file

@ -9,15 +9,16 @@ object frmDescrEdit: TfrmDescrEdit
ClientHeight = 300
ClientWidth = 400
OnCreate = FormCreate
OnDestroy = FormDestroy
Position = poScreenCenter
LCLVersion = '1.2.0.3'
LCLVersion = '1.6.0.2'
object lblEditCommentFor: TLabel
AnchorSideLeft.Control = Owner
AnchorSideTop.Control = Owner
Left = 12
Height = 13
Height = 15
Top = 12
Width = 85
Width = 96
BorderSpacing.Left = 12
BorderSpacing.Top = 12
Caption = 'E&dit comment for:'
@ -28,10 +29,10 @@ object frmDescrEdit: TfrmDescrEdit
AnchorSideTop.Control = cbEncoding
AnchorSideTop.Side = asrCenter
AnchorSideRight.Control = cbEncoding
Left = 229
Height = 13
Top = 223
Width = 47
Left = 223
Height = 15
Top = 221
Width = 53
Anchors = [akTop, akRight]
BorderSpacing.Right = 12
Caption = '&Encoding:'
@ -43,9 +44,9 @@ object frmDescrEdit: TfrmDescrEdit
AnchorSideTop.Control = lblEditCommentFor
AnchorSideTop.Side = asrBottom
Left = 12
Height = 13
Top = 31
Width = 18
Height = 15
Top = 33
Width = 15
BorderSpacing.Top = 6
Caption = '???'
Font.Style = [fsBold]
@ -60,8 +61,8 @@ object frmDescrEdit: TfrmDescrEdit
AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = cbEncoding
Left = 12
Height = 155
Top = 52
Height = 149
Top = 56
Width = 376
Anchors = [akTop, akLeft, akRight, akBottom]
BorderSpacing.Left = 12
@ -77,12 +78,12 @@ object frmDescrEdit: TfrmDescrEdit
AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = btnCancel
Left = 288
Height = 21
Top = 219
Height = 23
Top = 217
Width = 100
Anchors = [akRight, akBottom]
BorderSpacing.Bottom = 12
ItemHeight = 13
ItemHeight = 15
OnChange = cbEncodingChange
Style = csDropDownList
TabOrder = 1

View file

@ -3,7 +3,7 @@
-------------------------------------------------------------------------
Dialog for editing file comments.
Copyright (C) 2008-2014 Alexander Koblov (alexx2000@mail.ru)
Copyright (C) 2008-2015 Alexander Koblov (alexx2000@mail.ru)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -15,9 +15,9 @@
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
}
unit fDescrEdit;
@ -47,6 +47,7 @@ type
procedure actExecute(Sender: TObject);
procedure cbEncodingChange(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure FormDestroy(Sender: TObject);
procedure memDescrKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
private
FDescr: TDescription;
@ -112,6 +113,11 @@ begin
btnOK.Caption := btnOK.Caption + ' (' + ShortcutsToText(Hotkey.Shortcuts) + ')';
end;
procedure TfrmDescrEdit.FormDestroy(Sender: TObject);
begin
HotMan.UnRegister(Self);
end;
procedure TfrmDescrEdit.memDescrKeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
begin