ScrollableControl.SetDisplayRectLocation(Int32, Int32) ScrollableControl.SetDisplayRectLocation(Int32, Int32) ScrollableControl.SetDisplayRectLocation(Int32, Int32) ScrollableControl.SetDisplayRectLocation(Int32, Int32) Method

定义

将显示窗口定位到指定的值。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 Int32 Int32 Int32

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

y
Int32 Int32 Int32 Int32

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

注解

如果将true DisplayRectangle属性设置为, 则属性为的虚拟大小和位置显示的ScrollableControl工作区。 AutoScrollIf the AutoScroll property is set to true, the DisplayRectangle property is the virtual size and position displayed client area of the ScrollableControl. 调用方法以滚动ScrollableControl到指定位置。 SetDisplayRectLocationCall 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.

适用于

另请参阅