RxFPC:TRxLookupEdit - fix show popup for on key press - id0032674

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6066 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
alexs75
2017-11-13 11:08:28 +00:00
parent cf2051c54c
commit ec8bc1339b

View File

@ -115,6 +115,7 @@ type
procedure ButtonClick; override; procedure ButtonClick; override;
function GetDefaultGlyphName: String; override; function GetDefaultGlyphName: String; override;
procedure KeyDown(var Key: Word; Shift: TShiftState); override; procedure KeyDown(var Key: Word; Shift: TShiftState); override;
procedure EditKeyDown(var Key: word; Shift: TShiftState); override;
procedure InternalClosePopup(AResult:boolean);virtual; procedure InternalClosePopup(AResult:boolean);virtual;
// //
procedure LookupDataSetChanged(Sender: TObject); virtual; procedure LookupDataSetChanged(Sender: TObject); virtual;
@ -580,6 +581,17 @@ begin
end; end;
end; end;
procedure TRxCustomDBLookupEdit.EditKeyDown(var Key: word; Shift: TShiftState);
begin
if (Key = VK_DOWN) and ((ssAlt in Shift) or (ssCtrl in Shift)) then
begin
ShowList;
Key := 0;
end
else
inherited EditKeyDown(Key, Shift);
end;
procedure TRxCustomDBLookupEdit.InternalClosePopup(AResult: boolean); procedure TRxCustomDBLookupEdit.InternalClosePopup(AResult: boolean);
begin begin
if Assigned(FOnClosePopup) then if Assigned(FOnClosePopup) then