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

# TScrollingWinControl.SetAutoScroll

Sets the value for the AutoScroll property.

## Declaration

Source position: forms.pp line 192

`protected procedure TScrollingWinControl.SetAutoScroll(`
`Value: Boolean`
`); virtual;`

## Arguments

`Value` |  | New value for the property.

## Description

When the property is changed to True, the UpdateScrollBars method is called to calculate the page, range, and visibility for HorzScrollBar and VertScrollBar. When changed to False, the HideScrollbars method is called to reset the page, range, and visibility for the scroll bars. If the BoundsRect is updated in either method, the original value is restored prior to exit.

## See also

TScrollingWinControl.HorzScrollBar |  | The horizontal scroll bar for the control.
TScrollingWinControl.VertScrollBar |  | The vertical scroll bar for the control.
TScrollingWinControl.UpdateScrollBars |  | Initializes or updates the scroll bars for the control.
TScrollingWinControl.AutoScroll |  | Indicates whether scroll bars are automatically displayed or hidden when needed.