mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-17 18:39:10 +02:00
LCL: Improve Tab and Enter behavior in TDBGrid when dgRowSelect in options. Issue #32468, patch from Michal Gawrycki.
git-svn-id: trunk@55942 -
This commit is contained in:
parent
7e8132a70d
commit
3b86b0e628
@ -2381,6 +2381,11 @@ var
|
|||||||
end;
|
end;
|
||||||
GridFlags := GridFlags + [gfEditingDone];
|
GridFlags := GridFlags + [gfEditingDone];
|
||||||
if (DeltaCol<>0) then
|
if (DeltaCol<>0) then
|
||||||
|
if Col + DeltaCol < FixedCols then
|
||||||
|
Col := FixedCols
|
||||||
|
else if Col + DeltaCol >= ColCount then
|
||||||
|
Col := ColCount - 1
|
||||||
|
else
|
||||||
Col := Col + DeltaCol;
|
Col := Col + DeltaCol;
|
||||||
GridFlags := GridFlags - [gfEditingDone];
|
GridFlags := GridFlags - [gfEditingDone];
|
||||||
end else
|
end else
|
||||||
@ -2396,7 +2401,7 @@ begin
|
|||||||
begin
|
begin
|
||||||
doOnKeyDown;
|
doOnKeyDown;
|
||||||
if (Key<>0) and ValidDataset then begin
|
if (Key<>0) and ValidDataset then begin
|
||||||
if (dgTabs in Options) and not (dgRowSelect in Options) then begin
|
if (dgTabs in Options) then begin
|
||||||
|
|
||||||
if ((ssShift in shift) and
|
if ((ssShift in shift) and
|
||||||
(Col<=GetFirstVisibleColumn) and (Row<=GetFirstVisibleRow)) then begin
|
(Col<=GetFirstVisibleColumn) and (Row<=GetFirstVisibleRow)) then begin
|
||||||
@ -2428,7 +2433,7 @@ begin
|
|||||||
key:=0;
|
key:=0;
|
||||||
if (dgEditing in Options) and not EditorMode then
|
if (dgEditing in Options) and not EditorMode then
|
||||||
EditorMode:=true
|
EditorMode:=true
|
||||||
else if not (dgRowSelect in Options) then begin
|
else begin
|
||||||
GetDeltaMoveNext(ssShift in Shift, DeltaCol, DeltaRow, AutoAdvance);
|
GetDeltaMoveNext(ssShift in Shift, DeltaCol, DeltaRow, AutoAdvance);
|
||||||
MoveSel(True);
|
MoveSel(True);
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user