DataGridViewCell.GetContentBounds Metoda

Definice

Vrátí ohraničující obdélník, který obklopuje oblast obsahu buňky.

Přetížení

GetContentBounds(Int32)

Vrátí ohraničující obdélník, který ohraničuje oblast obsahu buňky pomocí výchozího Graphics stylu a stylu buňky, který je aktuálně platný pro buňku.

GetContentBounds(Graphics, DataGridViewCellStyle, Int32)

Vrátí ohraničující obdélník, který obklopuje oblast obsahu buňky, která se vypočítá pomocí zadaného Graphics stylu a buňky.

GetContentBounds(Int32)

Vrátí ohraničující obdélník, který ohraničuje oblast obsahu buňky pomocí výchozího Graphics stylu a stylu buňky, který je aktuálně platný pro buňku.

public:
 System::Drawing::Rectangle GetContentBounds(int rowIndex);
public System.Drawing.Rectangle GetContentBounds (int rowIndex);
member this.GetContentBounds : int -> System.Drawing.Rectangle
Public Function GetContentBounds (rowIndex As Integer) As Rectangle

Parametry

rowIndex
Int32

Index nadřazeného řádku buňky.

Návraty

Ten Rectangle , který ohraničuje obsah buňky.

Výjimky

Zadaná rowIndex hodnota je menší než 0 nebo větší než počet řádků v ovládacím prvku minus 1.

ColumnIndex je menší než 0, což znamená, že buňka je buňka záhlaví řádku.

Poznámky

Velikost obsahu buňky se vypočítá dynamicky při zavolání této metody. Implementace základní třídy vždy vrátí Rectangle.Empty.

Viz také

Platí pro

GetContentBounds(Graphics, DataGridViewCellStyle, Int32)

Vrátí ohraničující obdélník, který obklopuje oblast obsahu buňky, která se vypočítá pomocí zadaného Graphics stylu a buňky.

protected:
 virtual System::Drawing::Rectangle GetContentBounds(System::Drawing::Graphics ^ graphics, System::Windows::Forms::DataGridViewCellStyle ^ cellStyle, int rowIndex);
protected virtual System.Drawing.Rectangle GetContentBounds (System.Drawing.Graphics graphics, System.Windows.Forms.DataGridViewCellStyle cellStyle, int rowIndex);
abstract member GetContentBounds : System.Drawing.Graphics * System.Windows.Forms.DataGridViewCellStyle * int -> System.Drawing.Rectangle
override this.GetContentBounds : System.Drawing.Graphics * System.Windows.Forms.DataGridViewCellStyle * int -> System.Drawing.Rectangle
Protected Overridable Function GetContentBounds (graphics As Graphics, cellStyle As DataGridViewCellStyle, rowIndex As Integer) As Rectangle

Parametry

graphics
Graphics

Grafický kontext buňky.

cellStyle
DataGridViewCellStyle

Hodnota DataGridViewCellStyle , která se má použít na buňku.

rowIndex
Int32

Index nadřazeného řádku buňky.

Návraty

Ten Rectangle , který ohraničuje obsah buňky.

Poznámky

Velikost obsahu buňky se vypočítá dynamicky při zavolání této metody. Implementace základní třídy vždy vrátí Rectangle.Empty.

Tato metoda je volána interně při ContentBounds čtení vlastnosti.

Viz také

Platí pro