From a25ae0618da515a75064d5b8348060f8557cf0f0 Mon Sep 17 00:00:00 2001 From: alexs75 Date: Tue, 14 Nov 2017 12:07:02 +0000 Subject: [PATCH] RxFPC:TRxDBLookupEdit - fix change data with UP and DOWN key if popup window not showing git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6071 8e941d3f-bd1b-0410-a28a-d453659cc2b4 --- components/rx/trunk/rxdb/rxlookup.pas | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/components/rx/trunk/rxdb/rxlookup.pas b/components/rx/trunk/rxdb/rxlookup.pas index e6029e39f..151562003 100644 --- a/components/rx/trunk/rxdb/rxlookup.pas +++ b/components/rx/trunk/rxdb/rxlookup.pas @@ -590,6 +590,15 @@ begin end else inherited EditKeyDown(Key, Shift); + if not (PopupVisible or ReadOnly) and (Key in [VK_UP, VK_DOWN]) and (Shift = []) then + begin + case Key of + VK_UP: if not FLookupDataLink.DataSet.BOF then FLookupDataLink.DataSet.Prior; + VK_DOWN: if not FLookupDataLink.DataSet.EOF then FLookupDataLink.DataSet.Next; + end; + Text:=FLookupDataLink.DataSet.FieldByName(FFieldList[FLookupDisplayIndex]).AsString; + Key:=0; + end; end; procedure TRxCustomDBLookupEdit.InternalClosePopup(AResult: boolean);