LCL, fix mousescrolling a fixed grid, issue #13360

git-svn-id: trunk@19041 -
This commit is contained in:
jesus 2009-03-20 08:06:36 +00:00
parent e9c207884b
commit bf50f029e1

View File

@ -2844,10 +2844,14 @@ begin
DRow:=DRow-Result.y;
end;
if DCol+Result.x<FFixedCols then DCol:=Result.x-FFixedCols else
if DCol+Result.x>ColCount-1 then DCol:=ColCount-1-Result.x;
if DRow+Result.y<FFixedRows then DRow:=Result.y-FFixedRows else
if DRow+Result.y>RowCount-1 then DRow:=RowCount-1-Result.y;
if DCol<>0 then begin
if DCol+Result.x<FFixedCols then DCol:=Result.x-FFixedCols else
if DCol+Result.x>ColCount-1 then DCol:=ColCount-1-Result.x;
end;
if DRow<>0 then begin
if DRow+Result.y<FFixedRows then DRow:=Result.y-FFixedRows else
if DRow+Result.y>RowCount-1 then DRow:=RowCount-1-Result.y;
end;
Inc(Result.x, DCol);
Inc(Result.y, DRow);