diff options
author | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2013-03-13 16:51:49 +0000 |
---|---|---|
committer | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2013-03-13 16:51:49 +0000 |
commit | 2c08351a6b8ca87f968a18eced069af1fbfe713c (patch) | |
tree | 14e0ec9b4bd8faf17426bddf9a073df5b4d966d9 /examples/apps/ide | |
parent | bcc991cb33af461c7a15a4a0123452963507156e (diff) | |
download | fpGUI-2c08351a6b8ca87f968a18eced069af1fbfe713c.tar.xz |
ide: Find in File dialog now responds to Enter key press in text seach field
Diffstat (limited to 'examples/apps/ide')
-rw-r--r-- | examples/apps/ide/src/frm_find.pas | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/examples/apps/ide/src/frm_find.pas b/examples/apps/ide/src/frm_find.pas index c781f956..03e27dd2 100644 --- a/examples/apps/ide/src/frm_find.pas +++ b/examples/apps/ide/src/frm_find.pas @@ -34,6 +34,7 @@ type btnHelp: TfpgButton; {@VFD_HEAD_END: FindForm} procedure chkReplaceChanged(Sender: TObject); + procedure edtFindTextKeyPressed(Sender: TObject; var KeyCode: Word; var ShiftState: TShiftState; var Consumed: Boolean); public procedure AfterCreate; override; end; @@ -81,6 +82,15 @@ begin edtReplaceText.Enabled := chkReplace.Checked; end; +procedure TFindForm.edtFindTextKeyPressed(Sender: TObject; var KeyCode: Word; var ShiftState: TShiftState; var Consumed: Boolean); +begin + if KeyCode = keyEnter then + begin + Consumed := True; + btnFind.Click; + end; +end; + procedure TFindForm.AfterCreate; begin {%region 'Auto-generated GUI code' -fold} @@ -111,6 +121,7 @@ begin Hint := ''; TabOrder := 2; Text := ''; + OnKeyPress := @edtFindTextKeyPressed; end; chkReplace := TfpgCheckBox.Create(self); |