Sign in Join
FPDoc Onlineexperiment

TCustomGrid.RangeContains function

Member of TCustomGridprotectedIn unit Grids

Indicates whether the specified grid rectangle contains the specified cell coordinates.

Declaration

pascal
function RangeContains(const ARange: TGridRect; ACol: Integer; 
 ARow: Integer): Boolean

Arguments

ARange

Grid rectangle with the cell coordinates examined in the method.

ACol

Column number for the cell to locate in the specified rectangle.

ARow

Row number for the cell to locate in the specified rectangle.

Function result

Returns True if the specified cell exists in the specified grid rectangle.

Description

RangeContains is a Boolean function used to determine whether the grid rectangle specified in the ARange argument contains the cell specified in the ACol and ARow arguments. The return value is True if the TGridRect instance includes the specified cell coordinates; ACol must be between the Left and Right members (inclusive) in the rectangle, ARow must be between the Top and Bottom members (inclusive) in the rectangle.

RangeContains is called from the GetIsCellSelected method and occurs when the IsCellSelected property is examined during mouse down event handling and state draw operations for the grid control.

Added in LCL version 4.5.

See also

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.