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

# TScrollEvent

Defines an event handler type for scrollbar events.

## Declaration

Source position: stdctrls.pp line 63

`type TScrollEvent = procedure(`
`Sender: TObject;`
`ScrollCode: TScrollCode;`
`var ScrollPos: Integer`
`) of object;`

## Arguments

`Sender` |  | The scrollbar for the event notification.
`ScrollCode` |  | The scroll action for the notification.
`ScrollPos` |  | New position for the scrollbar.

## Description

TScrollEvent is an object procedure which defines an event handler signalled when a scroll event occurs in the scrollbar widgetset class. The event handler is called before the new Position is set for the control. The value in Position can be adjusted to implement custom scrollbar behavior.

TScrollEvent is the type used to implement the OnScroll event handler in TCustomScrollBar.

## See also

TCustomScrollBar.OnScroll |  | Event handler signalled when scrollbar messages are applied.
TCustomScrollBar.Scroll |  | Signals the OnScroll event handler.