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

# TCustomGrid.UpdateVertScrollbar

Updates the vertical scroll bar to use the specified visibility, range, and page values.

## Declaration

Source position: grids.pas line 1210

`protected procedure TCustomGrid.UpdateVertScrollbar(`
`const aVisible: Boolean;`
`const aRange: Integer;`
`const aPage: Integer;`
`const aPos: Integer`
`); virtual;`

## Arguments

`aVisible` |  | True if the scroll bar should be visible.
`aRange` |  | Maximum position for the scroll bar.
`aPage` |  | Page size for a thumb tab in the scroll bar.
`aPos` |  | Position for the scroll bar.

## Description

UpdateVertScrollbar calls ScrollBarShow to update the scroll bar visibility when it differs from the value in aVisible. The ScrollBarRange method is called to apply the values in ARange, APage, and APos to the vertical scroll bar for the control.

The scroll bar range is not updated if the scroll bar visibility has not been changed or if the scroll bar is not visible. For the Darwin platform, ScrollBarRange is always called - regardless of visibility; overlay-style scroll bars on macOS require the latest range, page, and position values.

UpdateVertScrollbar is called from the CalcScrollbarsRange method when the visible area in the grid is scrolled.

## See also

TCustomGrid.ScrollBarShow |  | Displays or hides scroll bar(s) for the grid control.
TCustomGrid.ScrollBarRange |  | Sets range information for the specified scroll bar.
TCustomGrid.ScrollBarIsVisible |  | Returns True if the specified scroll bar is visible.