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

# TScrollingWinControl.ScrollInView

Aligns the specified control to its parent and scrolls it into view.

## Declaration

Source position: forms.pp line 205

`public procedure TScrollingWinControl.ScrollInView(`
`AControl: TControl`
`);`

## Arguments

`AControl` |  | Control to make visible in the scrolling window control.

## Description

ScrollInView is a method used to align and scroll the control in AControl into the visible area for the scrolling window control. No actions are performed in the method under the following conditions:

- AControl has not been assigned (contains Nil).
- The control is not the Parent (or ancestor) for AControl.
- Neither horizontal nor vertical scroll bars are displayed for the control.

The origin for AControl relative to its Parent is determined by calling the ClientToParent method. OffsetRect (in Types) is called to apply the offset to the display rectangle for AControl. The adjusted coordinates are used to reposition the visible scroll bars so that AControl is visible in the client area for the scrolling window control.

## See also

TScrollingWinControl.VertScrollBar |  | The vertical scroll bar for the control.
TScrollingWinControl.HorzScrollBar |  | The horizontal scroll bar for the control.
TScrollingWinControl.AlignControls |  | Aligns the controls which have the class instance as their Parent.
TControlScrollBar.Position |  | Position of the scroll bar slider in the range 0..Range-Page.
TControl.ClientToParent |  | Converts the specified client coordinates to the screen coordinates for the specified parent control.
OffsetRect