mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-17 00:29:28 +02:00
LCL, grids: added option to not scroll in a selected partially visible cell, issue #18251
git-svn-id: trunk@32138 -
This commit is contained in:
parent
c72bad92c1
commit
32102f58e7
@ -103,7 +103,8 @@ type
|
|||||||
goHeaderHotTracking, // Header cells change look when mouse is over them
|
goHeaderHotTracking, // Header cells change look when mouse is over them
|
||||||
goHeaderPushedLook, // Header cells looks pushed when clicked
|
goHeaderPushedLook, // Header cells looks pushed when clicked
|
||||||
goSelectionActive, // Setting grid.Selection moves also cell cursor
|
goSelectionActive, // Setting grid.Selection moves also cell cursor
|
||||||
goFixedColSizing
|
goFixedColSizing, // Allow to resize fixed columns
|
||||||
|
goDontScrollPartCell // clicking partially visible cells will not scroll
|
||||||
);
|
);
|
||||||
TGridOptions = set of TGridOption;
|
TGridOptions = set of TGridOption;
|
||||||
|
|
||||||
@ -3156,7 +3157,8 @@ begin
|
|||||||
Xinc := 1 // hidden at the right of clientwidth line
|
Xinc := 1 // hidden at the right of clientwidth line
|
||||||
else
|
else
|
||||||
if (RNew.Left > FGCache.FixedWidth+GetBorderWidth) and
|
if (RNew.Left > FGCache.FixedWidth+GetBorderWidth) and
|
||||||
(RNew.Left < CWidth) and (CWidth < RNew.Right) then begin
|
(RNew.Left < CWidth) and (CWidth < RNew.Right) and
|
||||||
|
(not (goDontScrollPartCell in Options)) then begin
|
||||||
Xinc := 1; // partially visible at the right
|
Xinc := 1; // partially visible at the right
|
||||||
FGCache.TLColOff := 0; // cancel col-offset for next calcs
|
FGCache.TLColOff := 0; // cancel col-offset for next calcs
|
||||||
end;
|
end;
|
||||||
@ -3169,7 +3171,8 @@ begin
|
|||||||
YInc := 1 // hidden at the bottom of clientheight line
|
YInc := 1 // hidden at the bottom of clientheight line
|
||||||
else
|
else
|
||||||
if (RNew.Top > FGCache.FixedHeight+GetBorderWidth) and
|
if (RNew.Top > FGCache.FixedHeight+GetBorderWidth) and
|
||||||
(RNew.Top < CHeight) and (CHeight < RNew.Bottom) then begin
|
(RNew.Top < CHeight) and (CHeight < RNew.Bottom) and
|
||||||
|
(not (goDontScrollPartCell in Options)) then begin
|
||||||
Yinc := 1; // partially visible at bottom
|
Yinc := 1; // partially visible at bottom
|
||||||
FGCache.TLRowOff := 0; // cancel row-offset for next calcs
|
FGCache.TLRowOff := 0; // cancel row-offset for next calcs
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user