ScrollableControl.SetDisplayRectLocation(Int32, Int32) 方法

定义

将显示窗口定位到指定的值。Positions the display window to the specified value.

protected:
 void SetDisplayRectLocation(int x, int y);
protected void SetDisplayRectLocation (int x, int y);
member this.SetDisplayRectLocation : int * int -> unit
Protected Sub SetDisplayRectLocation (x As Integer, y As Integer)

参数

x
Int32

定位 ScrollableControl 的水平偏移量。The horizontal offset at which to position the ScrollableControl.

y
Int32

定位 ScrollableControl 的垂直偏移量。The vertical offset at which to position the ScrollableControl.

注解

如果 AutoScroll 属性设置为 true,则 DisplayRectangle 属性是 ScrollableControl的虚拟大小和位置显示的工作区。If the AutoScroll property is set to true, the DisplayRectangle property is the virtual size and position displayed client area of the ScrollableControl. 调用 SetDisplayRectLocation 方法,将 ScrollableControl 滚动到指定位置。Call the SetDisplayRectLocation method to scroll through the ScrollableControl to the specified position.

调用方说明

SetDisplayRectLocation(Int32, Int32) 不会更新滚动条的位置。 SetDisplayRectLocation(Int32, Int32) does not update the position of the scroll bars. 若要更新滚动条,请调用 AdjustFormScrollbars(Boolean) 方法。To update the scroll bars, call the AdjustFormScrollbars(Boolean) method.

适用于

另请参阅