DataGridViewCell.GetErrorIconBounds(Graphics, DataGridViewCellStyle, Int32) DataGridViewCell.GetErrorIconBounds(Graphics, DataGridViewCellStyle, Int32) DataGridViewCell.GetErrorIconBounds(Graphics, DataGridViewCellStyle, Int32) Method

定義

傳回圍住儲存格的錯誤圖示之週框 (如果有此圖示)。Returns the bounding rectangle that encloses the cell's error icon, if one is displayed.

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

參數

graphics
Graphics Graphics Graphics

儲存格的圖形內容。The graphics context for the cell.

cellStyle
DataGridViewCellStyle DataGridViewCellStyle DataGridViewCellStyle

要套用到儲存格的 DataGridViewCellStyleThe DataGridViewCellStyle to be applied to the cell.

rowIndex
Int32 Int32 Int32

儲存格的父資料列索引。The index of the cell's parent row.

傳回

圍住儲存格的錯誤圖示之 Rectangle (如果有此圖示),否則為 EmptyThe Rectangle that bounds the cell's error icon, if one is displayed; otherwise, Empty.

備註

呼叫這個方法時,資料格的錯誤圖示區域大小會動態計算。The size of the cell's error icon area is computed dynamically when this method is called. 基類的實作為一律Rectangle.Empty會傳回。The base class implementation always returns Rectangle.Empty.

當讀取ErrorIconBounds屬性時,會在內部呼叫這個方法。This method is called internally when the ErrorIconBounds property is read.

適用於

另請參閱