Sign in Join
FPDoc Onlineexperiment

TCustomGrid.CellExtent procedure

Member of TCustomGridprotectedIn unit Grids

Gets the last column number for the cell extent at the specified column and row.

Declaration

pascal
procedure CellExtent(const aCol: Integer; const aRow: Integer; 
 var R: TRect; out exCol: Integer)

Arguments

aCol

Column number for the cell extent.

aRow

Row number for the cell extent.

R

TRect with the bounds for the cell extent.

exCol

Last usable column number for the cell extent.

Description

CellExtent gets the extent rectangle for the cell at the coordinated in ACol and ARow. The rectangle bounds in R are updated by calling the CalcCellExtent method.

exCol is updated in the method to reflect the last visible column in the cached grid information for the cell extent. The ColRowToOffset method is iteratively called until the extent exceeds the cached right-most column for the visible area in the grid.

CellExtent is called from the DrawRow method when column spanning is enabled in the Options for the grid control.

The current implementation does not account for BIDI mode or Right-to-Left usage.

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