DataGridView.GetCellDisplayRectangle(Int32, Int32, Boolean) Metoda

Definicja

Zwraca prostokąt reprezentujący obszar wyświetlania dla komórki.

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

Parametry

columnIndex
Int32

Indeks kolumny dla żądanej komórki.

rowIndex
Int32

Indeks wiersza dla żądanej komórki.

cutOverflow
Boolean

true aby zwrócić wyświetlaną część komórki tylko; false aby zwrócić wszystkie granice komórki.

Zwraca

Obiekt Rectangle reprezentujący prostokąt wyświetlania komórki.

Wyjątki

columnIndex jest mniejsza niż -1 lub większa niż liczba kolumn w kontrolce minus 1.

-lub-

rowIndex jest mniejsza niż -1 lub większa niż liczba wierszy w kontrolce minus 1.

Uwagi

Ta metoda zwraca wszystkie granice komórki lub tylko wyświetlaną część. Aby uzyskać tylko granice zawartości komórki, użyj właściwości komórki ContentBounds .

Dotyczy

Zobacz też