mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-08 13:56:24 +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 }
|
{ Exposed procs }
|
||||||
procedure AutoAdjustColumns;
|
procedure AutoAdjustColumns;
|
||||||
procedure BeginUpdate;
|
procedure BeginUpdate;
|
||||||
|
function BoxRect(ALeft,ATop,ARight,ABottom: Longint): TRect;
|
||||||
function CellRect(ACol, ARow: Integer): TRect;
|
function CellRect(ACol, ARow: Integer): TRect;
|
||||||
function CellToGridZone(aCol,aRow: Integer): TGridZone;
|
function CellToGridZone(aCol,aRow: Integer): TGridZone;
|
||||||
procedure CheckPosition;
|
procedure CheckPosition;
|
||||||
@ -6040,6 +6041,25 @@ begin
|
|||||||
Inc(FUpdateCount);
|
Inc(FUpdateCount);
|
||||||
end;
|
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);
|
procedure TCustomGrid.EndUpdate(aRefresh: boolean = true);
|
||||||
begin
|
begin
|
||||||
Dec(FUpdateCount);
|
Dec(FUpdateCount);
|
||||||
|
Loading…
Reference in New Issue
Block a user