DataGridView.GetColumnDisplayRectangle(Int32, Boolean) 方法

定义

返回表示列的显示区域的矩形,该矩形由列索引确定。

public:
 System::Drawing::Rectangle GetColumnDisplayRectangle(int columnIndex, bool cutOverflow);
public System.Drawing.Rectangle GetColumnDisplayRectangle(int columnIndex, bool cutOverflow);
member this.GetColumnDisplayRectangle : int * bool -> System.Drawing.Rectangle
Public Function GetColumnDisplayRectangle (columnIndex As Integer, cutOverflow As Boolean) As Rectangle

参数

columnIndex
Int32

所需单元格的列索引。

cutOverflow
Boolean

true 如果返回边界中可见的 DataGridView 列矩形, false 则返回整个列矩形。

返回

表示 Rectangle 列的显示矩形。

例外

columnIndex 不在 0 到列数减 1 的有效范围内。

适用于

另请参阅