[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] Reference for unit 'Grids' (#lcl)

TCustomGrid.OffsetToColRow

Determines the index of a column or row for a the specified offset.

Declaration

Source position: grids.pas line 1160

protected function TCustomGrid.OffsetToColRow(

  IsCol: Boolean;

  Physical: Boolean;

  Offset: Integer;

  out Index: Integer;

  out Rest: Integer

):Boolean;

Arguments

IsCol

  

True if the offset is for a column, False for a row.

Physical

  

True for a physical offset (i.e. relative to the scrolled grid), False for a logical offset (i.e. relative to the unscrolled grid).

Offset

  

Distance of the location to be tested (in pixels) from the left edge of the grid (in case of IsCol=true) or the top edge of the grid (in case of IsCol=false).

Index

  

Index of the column or row at the specified offset.

Rest

  

Remaining pixels between the Offset value and the left edge of the column (in case of IsCol=true) or the top edge of the row (in case of IsCol=false) identified by Index.

Function result

True if a column and row number was identified for the specified offset.

Version info

Index and Rest arguments were changed to output parameters in LCL version 2.1 (revision 65087).


Version 4.0 Generated 2025-05-03 Home