SetDisplayRectLocation Method

ScrollableControl.SetDisplayRectLocation Method (Int32, Int32)

 

Positions the display window to the specified value.

Namespace:   System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

protected void SetDisplayRectLocation(
	int x,
	int y
)

Parameters

x
Type: System.Int32

The horizontal offset at which to position the ScrollableControl.

y
Type: System.Int32

The vertical offset at which to position the ScrollableControl.

If the AutoScroll property is set to true, the DisplayRectangle property is the virtual size and position displayed client area of the ScrollableControl. Call the SetDisplayRectLocation method to scroll through the ScrollableControl to the specified position.

Notes to Callers:

SetDisplayRectLocation does not update the position of the scroll bars. To update the scroll bars, call the AdjustFormScrollbars method.

.NET Framework
Available since 1.1
Return to top
Show:
© 2016 Microsoft