DataGridViewCell.GetErrorIconBounds メソッド

定義

セルのエラー アイコンが表示されている場合に、そのエラー アイコンを囲む外接する四角形を返します。

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

パラメーター

graphics
Graphics

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

cellStyle
DataGridViewCellStyle

セルに適用する DataGridViewCellStyle

rowIndex
Int32

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

戻り値

セルのエラー アイコンが表示されている場合は、そのエラー アイコンに外接する Rectangle、それ以外の場合は Empty

注釈

セルのエラー アイコン領域のサイズは、このメソッドが呼び出されたときに動的に計算されます。 基底クラスの実装では、常に が返されます Rectangle.Empty

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

適用対象

こちらもご覧ください