Language

DataGridViewCell.GetContentBounds メソッド

定義

セルのコンテンツ領域を囲む外接する四角形を返します。

オーバーロード

名前 説明
GetContentBounds(Int32)

セルの現在有効な既定の Graphics とセル スタイルを使用して、セルのコンテンツ領域を囲む外接する四角形を返します。

GetContentBounds(Graphics, DataGridViewCellStyle, Int32)

セルのコンテンツ領域を囲む外接する四角形を返します。この四角形は、指定した Graphics とセル スタイルを使用して計算されます。

GetContentBounds(Int32)

ソース:
DataGridViewCell.cs
ソース:
DataGridViewCell.cs
ソース:
DataGridViewCell.cs
ソース:
DataGridViewCell.cs
ソース:
DataGridViewCell.cs

セルの現在有効な既定の Graphics とセル スタイルを使用して、セルのコンテンツ領域を囲む外接する四角形を返します。

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

パラメーター

rowIndex
Int32

セルの親行のインデックス。

返品

セルの内容をバインドする Rectangle 。

例外

指定した rowIndex が 0 未満であるか、コントロール内の行数から 1 を引いた数より大きい値です。

ColumnIndex が 0 未満の場合は、セルが行ヘッダー セルであることを示します。

注釈

セルの内容のサイズは、このメソッドが呼び出されたときに動的に計算されます。 基底クラスの実装は常に Rectangle.Emptyを返します。

こちらもご覧ください

適用対象

GetContentBounds(Graphics, DataGridViewCellStyle, Int32)

ソース:
DataGridViewCell.cs
ソース:
DataGridViewCell.cs
ソース:
DataGridViewCell.cs
ソース:
DataGridViewCell.cs
ソース:
DataGridViewCell.cs

セルのコンテンツ領域を囲む外接する四角形を返します。この四角形は、指定した Graphics とセル スタイルを使用して計算されます。

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

パラメーター

graphics
Graphics

セルのグラフィックス コンテキスト。

cellStyle
DataGridViewCellStyle

セルに適用する DataGridViewCellStyle 。

rowIndex
Int32

セルの親行のインデックス。

返品

セルの内容をバインドする Rectangle 。

注釈

セルの内容のサイズは、このメソッドが呼び出されたときに動的に計算されます。 基底クラスの実装は常に Rectangle.Emptyを返します。

このメソッドは、 ContentBounds プロパティの読み取り時に内部的に呼び出されます。

こちらもご覧ください

適用対象