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

# TGridScroller

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Scrolls an associated grid when a column or row is dragged beyond the client area for the control.

## Declaration

Source position: grids.pas line 728

`type TGridScroller = class`
`public`
`constructor Create();` |  | Constructor for the class instance.
`destructor Destroy; override;` |  | Destructor for the class instance.
`procedure Start();` |  | Stores the scroll direction and starts the internal timer for the class instance.
`end;`

## Inheritance

`TGridScroller` |  | Scrolls an associated grid when a column or row is dragged beyond the client area for the control.
`TObject`

## Description

TGridScroller provides methods and internal members which implement a timer-based callback routine fired every 200ms (milliseconds). The routine handles scrolling a grid control in a given direction by changing the top/left visible cell for the control. The callback routine is passed as an argument to the constructor for the class instance, and points to a private method in the TCustomGrid instance.

TGridScroller is used in the implementation of TCustomGrid. The callback routine is signalled when MouseMove handles a row or column drag operation for the control. The class instance is created as needed, and freed when the drag operation is completed in the MouseUp method for the grid control.

## See also

TCustomGrid.MouseMove |  | Applies a change in the mouse pointer position to the grid control.
TCustomGrid.MouseUp |  | Handles a mouse up event for the grid control.
TCustomGrid.Destroy |  | Destructor for the class instance.