DataGridViewCell.ErrorIconBounds DataGridViewCell.ErrorIconBounds DataGridViewCell.ErrorIconBounds DataGridViewCell.ErrorIconBounds Property

定義

取得儲存格之錯誤圖示的界限。Gets the bounds of the error icon for the cell.

public:
 property System::Drawing::Rectangle ErrorIconBounds { System::Drawing::Rectangle get(); };
[System.ComponentModel.Browsable(false)]
public System.Drawing.Rectangle ErrorIconBounds { get; }
member this.ErrorIconBounds : System.Drawing.Rectangle
Public ReadOnly Property ErrorIconBounds As Rectangle

屬性值

Rectangle,表示目前 DataGridViewCell 之錯誤圖示的界限。A Rectangle that represents the bounds of the error icon for the current DataGridViewCell.

例外狀況

儲存格不屬於 DataGridView 控制項。The cell does not belong to a DataGridView control.

-或--or- ColumnIndex 小於 0,表示儲存格是資料列行首儲存格。ColumnIndex is less than 0, indicating that the cell is a row header cell.

包含儲存格的資料列是共用的資料列。The row containing the cell is a shared row.

-或--or-

儲存格是資料行行首儲存格。The cell is a column header cell.

備註

傳回的矩形會報告用戶端座標(以圖元為單位)。The returned rectangle reports client coordinates, in pixels.

當屬性為false時,這個屬性的值為EmptyDataGridView.ShowCellErrorsWhen the DataGridView.ShowCellErrors property is false, the value of this property is Empty.

這個屬性會呼叫GetErrorIconBounds方法來取得其值。This property calls the GetErrorIconBounds method to get its value. 對於基底DataGridViewCell類型,這個值一律Empty為。For the base DataGridViewCell type, this value is always Empty.

適用於

另請參閱