System.Windows.Forms.ScrollableControl.ScrollControlIntoView Method

Scrolls the specified child control into view on an auto-scroll enabled control.

Syntax

public void ScrollControlIntoView (Control activeControl)

Parameters

activeControl
The child control to scroll into view.

Remarks

The ScrollableControl.AutoScroll property must be set to true, and at least one of the scroll bars, horizontal or vertical, must also be visible, for the ScrollableControl.ScrollControlIntoView(Control) method to have an effect. To make the horizontal and vertical scroll bars visible, the ScrollableControl.HScroll and ScrollableControl.VScroll properties, respectively, must be set to true.

If the activeControl parameter is not a child control, no action takes place.

This method may raise the ScrollableControl.Scroll event.

Requirements

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0