mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-10 22:36:17 +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,7 +2381,12 @@ var
|
||||
end;
|
||||
GridFlags := GridFlags + [gfEditingDone];
|
||||
if (DeltaCol<>0) then
|
||||
Col := Col + DeltaCol;
|
||||
if Col + DeltaCol < FixedCols then
|
||||
Col := FixedCols
|
||||
else if Col + DeltaCol >= ColCount then
|
||||
Col := ColCount - 1
|
||||
else
|
||||
Col := Col + DeltaCol;
|
||||
GridFlags := GridFlags - [gfEditingDone];
|
||||
end else
|
||||
if AReset then
|
||||
@ -2396,7 +2401,7 @@ begin
|
||||
begin
|
||||
doOnKeyDown;
|
||||
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
|
||||
(Col<=GetFirstVisibleColumn) and (Row<=GetFirstVisibleRow)) then begin
|
||||
@ -2428,7 +2433,7 @@ begin
|
||||
key:=0;
|
||||
if (dgEditing in Options) and not EditorMode then
|
||||
EditorMode:=true
|
||||
else if not (dgRowSelect in Options) then begin
|
||||
else begin
|
||||
GetDeltaMoveNext(ssShift in Shift, DeltaCol, DeltaRow, AutoAdvance);
|
||||
MoveSel(True);
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user