Share via


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

適用於

另請參閱