ScrollableControl.DisplayRectangle 属性


获取表示控件的虚拟显示区的矩形。Gets the rectangle that represents the virtual display area of the control.

 virtual property System::Drawing::Rectangle DisplayRectangle { System::Drawing::Rectangle get(); };
public override System.Drawing.Rectangle DisplayRectangle { get; }
member this.DisplayRectangle : System.Drawing.Rectangle
Public Overrides ReadOnly Property DisplayRectangle As Rectangle


一个 Rectangle,它表示控件的显示区域。A Rectangle that represents the display area of the control.


如果 AutoScroll 属性设置为 true,则 DisplayRectangle 属性是 ScrollableControl 控件的虚拟大小和位置。If the AutoScroll property is set to true, the DisplayRectangle property is the virtual size and position of the ScrollableControl control. 例如,如果 ScrollableControl 的宽度和高度均为100像素,且控件包含超出其边界的控件,则 DisplayRectangle 表示 ScrollableControl 包含包含的控件所需的大小。For example, if the width and height of the ScrollableControl are both 100 pixels and the control contains controls that extend beyond its boundaries, DisplayRectangle represents the size the ScrollableControl needs to be to include the contained controls. 同样,DisplayRectangleXY 属性与 ScrollableControl的滚动位置相关。Similarly, the X and Y properties of DisplayRectangle are relevant to the scroll position of the ScrollableControl.