RxFPC:fix TRxDBCurrEdit ReadOnly - tnx bpranoto

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@8029 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
alexs75
2021-05-12 14:00:21 +00:00
parent a9c9aa1c73
commit d5d13bb856

View File

@ -192,12 +192,16 @@ end;
procedure TRxDBCurrEdit.KeyDown(var Key: Word; Shift: TShiftState);
begin
inherited KeyDown(Key, Shift);
if Self.FDataLink.Editing then begin
if Key=VK_ESCAPE then
begin
//cancel out of editing by reset on esc
FDataLink.Reset;
SelectAll;
Key := VK_UNKNOWN;
end
else
if (Key<>VK_UNKNOWN) then
@ -207,6 +211,12 @@ begin
//read only even though the dataset isn't realy in edit
FDataLink.Edit;
end;
end
else begin
if Key <> VK_TAB then begin
Key := VK_UNKNOWN;
end;
end;
end;
procedure TRxDBCurrEdit.Change;