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

# TCustomGrid.ScrollBarRange

Sets range information for the specified scroll bar.

## Declaration

Source position: grids.pas line 1176

`protected procedure TCustomGrid.ScrollBarRange(`
`Which: Integer;`
`aRange: Integer;`
`aPage: Integer;`
`aPos: Integer`
`);`

## Arguments

`Which` |  | Integer constant which identifies the scroll bar updated in the method.
`aRange` |  | Maximum value for the scroll bar range.
`aPage` |  | Specifies the page size for the proportionally-sized thumb bar.
`aPos` |  | Current position in the scroll bar range.

## Description

Which contains an Integer value which indicates the scroll bar updated in the method. It corresponds to the SB_Horz, or SB_Vert values defined in the lcltype.pp unit. ARange, APage, and APos contain the values applied to the corresponding scroll bar.

ScrollBarRange allocates and initializes the TScrollInfo structure passed as an argument to the SetScrollInfo routine in the LCL interface. The value in the APos argument is translated for a horizontal scroll bar to be relative to ARange when right-to-left reading is used in the control.

ScrollBarRange is called from the UpdateHorzScrollBar and UpdateVertScrollbar methods.