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
This commit is contained in:
alexs75
2017-11-14 12:07:02 +00:00
parent b2ed81ee6e
commit a25ae0618d

View File

@ -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);