語言

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 的有效範圍內。

適用於

另請參閱