diff options
-rw-r--r-- | src/gui/inputquerydialog.inc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gui/inputquerydialog.inc b/src/gui/inputquerydialog.inc index 5b063233..e7769246 100644 --- a/src/gui/inputquerydialog.inc +++ b/src/gui/inputquerydialog.inc @@ -30,6 +30,7 @@ type btnCancel: TfpgButton; {@VFD_HEAD_END: fpgQueryDialog} procedure SetupCaptions; + procedure edtTextKeyPressed(Sender: TObject; var KeyCode: word; var ShiftState: TShiftState; var Consumed: boolean); public procedure AfterCreate; override; end; @@ -62,6 +63,12 @@ begin btnCancel.Text := rsCancel; end; +procedure TfpgQueryDialog.edtTextKeyPressed(Sender: TObject; var KeyCode: word; var ShiftState: TShiftState; var Consumed: boolean); +begin + if KeyCode = keyEnter then + btnOK.Click; +end; + procedure TfpgQueryDialog.AfterCreate; begin {%region 'Auto-generated GUI code' -fold} @@ -94,6 +101,7 @@ begin TabOrder := 2; Text := ''; FontDesc := '#Edit1'; + OnKeyPress := @edtTextKeyPressed; end; btnOK := TfpgButton.Create(self); |