mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-07 10:16:09 +02:00
LCL, implemented grid's BoxRect method
git-svn-id: trunk@19156 -
This commit is contained in:
parent
2a566aa129
commit
f2b575d55c
@ -1026,6 +1026,7 @@ type
|
||||
{ Exposed procs }
|
||||
procedure AutoAdjustColumns;
|
||||
procedure BeginUpdate;
|
||||
function BoxRect(ALeft,ATop,ARight,ABottom: Longint): TRect;
|
||||
function CellRect(ACol, ARow: Integer): TRect;
|
||||
function CellToGridZone(aCol,aRow: Integer): TGridZone;
|
||||
procedure CheckPosition;
|
||||
@ -6040,6 +6041,25 @@ begin
|
||||
Inc(FUpdateCount);
|
||||
end;
|
||||
|
||||
function TCustomGrid.BoxRect(ALeft, ATop, ARight, ABottom: Longint): TRect;
|
||||
begin
|
||||
if ARight<ALeft then
|
||||
SwapInt(ALeft, ARight);
|
||||
if ABottom<ATop then
|
||||
SwapInt(ATop, ABottom);
|
||||
|
||||
Result := CellRect(ALeft, ATop);
|
||||
with CellRect(ARight, ABottom) do
|
||||
Result.BottomRight := BottomRight;
|
||||
|
||||
with FGCache.VisibleGrid do begin
|
||||
Result.Left:=Max(Result.Left, Left);
|
||||
Result.Right:=Min(Result.Right, Right);
|
||||
Result.Top:=Max(Result.Top, Top);
|
||||
Result.Bottom:=Min(Result.Bottom,Bottom);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TCustomGrid.EndUpdate(aRefresh: boolean = true);
|
||||
begin
|
||||
Dec(FUpdateCount);
|
||||
|
Loading…
Reference in New Issue
Block a user