mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-18 17:39:22 +02:00
fixed delete key in dbgrids bug #878 from Jesus
git-svn-id: trunk@7130 -
This commit is contained in:
parent
e960ef3dd5
commit
f8ed47daf6
@ -4976,17 +4976,7 @@ begin
|
|||||||
KeyPress(Key); // grid must get all keypresses, even if they are from the editor
|
KeyPress(Key); // grid must get all keypresses, even if they are from the editor
|
||||||
case Key of
|
case Key of
|
||||||
^C,^V,^X:;
|
^C,^V,^X:;
|
||||||
{
|
^M: Key:=#0; // key is already handled in KeyDown
|
||||||
^V:
|
|
||||||
begin
|
|
||||||
if Clipboard.FormatCount>0 then begin
|
|
||||||
DebugLn('El clipboard tiene ', Dbgs(Clipboard.FormatCount),'formatos, HasText=', dbgs(Clipboard.HasFormat(CF_TEXT)));
|
|
||||||
end else begin
|
|
||||||
DebugLn('El clipboard esta vacio');
|
|
||||||
Key := #0;
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
}
|
|
||||||
#8:
|
#8:
|
||||||
if EditorIsReadOnly then
|
if EditorIsReadOnly then
|
||||||
Key := #0;
|
Key := #0;
|
||||||
@ -5855,6 +5845,11 @@ procedure TStringCellEditor.KeyDown(var Key: Word; Shift: TShiftState);
|
|||||||
else
|
else
|
||||||
Result := False;
|
Result := False;
|
||||||
end;
|
end;
|
||||||
|
procedure CheckEditingKey;
|
||||||
|
begin
|
||||||
|
if (FGrid=nil) or FGrid.EditorIsReadOnly then
|
||||||
|
Key := 0;
|
||||||
|
end;
|
||||||
var
|
var
|
||||||
IntSel: boolean;
|
IntSel: boolean;
|
||||||
begin
|
begin
|
||||||
@ -5868,6 +5863,8 @@ begin
|
|||||||
SelLength := 0;
|
SelLength := 0;
|
||||||
SelStart := Length(Text);
|
SelStart := Length(Text);
|
||||||
end;
|
end;
|
||||||
|
VK_DELETE:
|
||||||
|
CheckEditingKey;
|
||||||
VK_UP, VK_DOWN:
|
VK_UP, VK_DOWN:
|
||||||
doGridKeyDown;
|
doGridKeyDown;
|
||||||
VK_LEFT, VK_RIGHT:
|
VK_LEFT, VK_RIGHT:
|
||||||
|
Loading…
Reference in New Issue
Block a user