mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-07 21:18:43 +01:00
LCL: fix dbgrids scrollbar thumbtracking, issue #33799
git-svn-id: trunk@58055 -
This commit is contained in:
parent
687cdf6ff9
commit
8144529ef7
@ -1456,6 +1456,8 @@ var
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
function DsPos: boolean;
|
function DsPos: boolean;
|
||||||
|
var
|
||||||
|
oldMaxPos: Integer;
|
||||||
begin
|
begin
|
||||||
result := false;
|
result := false;
|
||||||
aPos := Message.Pos;
|
aPos := Message.Pos;
|
||||||
@ -1463,12 +1465,22 @@ var
|
|||||||
result := true;
|
result := true;
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
if aPos>=MaxPos then
|
oldMaxPos := MaxPos;
|
||||||
|
if aPos>=oldMaxPos then
|
||||||
dsGoto(False)
|
dsGoto(False)
|
||||||
else if aPos<=0 then
|
else if aPos<=0 then
|
||||||
dsGoto(True)
|
dsGoto(True)
|
||||||
else if IsSeq then
|
else if IsSeq then begin
|
||||||
FDatalink.DataSet.RecNo := aPos + 1
|
FDatalink.DataSet.RecNo := aPos + 1;
|
||||||
|
{$IFDEF MSWINDOWS}
|
||||||
|
// Workaround for scrollbar range not being updated
|
||||||
|
// probably only needed under windows, issue 33799
|
||||||
|
if oldMaxPos<>MaxPos then begin
|
||||||
|
ScrollBarShow(SB_VERT, false);
|
||||||
|
ScrollBarShow(SB_VERT, true);
|
||||||
|
end;
|
||||||
|
{$ENDIF}
|
||||||
|
end
|
||||||
else begin
|
else begin
|
||||||
DeltaRec := Message.Pos - FOldPosition;
|
DeltaRec := Message.Pos - FOldPosition;
|
||||||
if DeltaRec=0 then begin
|
if DeltaRec=0 then begin
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user