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

# TCustomScrollBar.Scroll

Signals the OnScroll event handler.

## Declaration

Source position: stdctrls.pp line 97

`protected procedure TCustomScrollBar.Scroll(`
`ScrollCode: TScrollCode;`
`var ScrollPos: Integer`
`); virtual;`

## Arguments

`ScrollCode` |  | Scroll command code for the operation; up or down a line, a page, to the top or bottom, etc.
`ScrollPos` |  | The new position for the scrollbar.

## Description

Scroll is a method used to signal the OnScroll event handler (when assigned) for the control.

ScrollCode contains the scrollbar command constant for the scroll operation. ScrollPos contains the new position for the scrollbar when the operation is completed.

Scroll is called from the implementation of the private DoScroll method, which handles scrollbar control messages and sets the values for the arguments to the method.

## See also

TCustomScrollBar.OnScroll |  | Event handler signalled when scrollbar messages are applied.