Sign in Join
FPDoc Onlineexperiment

TCustomGrid.OffsetToColRow function

Member of TCustomGridprotectedIn unit Grids

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

Declaration

pascal
function OffsetToColRow(IsCol: Boolean; Physical: Boolean; 
 Offset: Integer; out Index: Integer; 
 out Rest: Integer): Boolean

Arguments

IsColTrue if the offset is for a column, False for a row.
PhysicalTrue 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.

Description

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

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