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.

適用於

另請參閱