DataGridViewCell.ErrorIconBounds 属性

定义

获取单元格的错误图标的界限。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; }
[<System.ComponentModel.Browsable(false)>]
member this.ErrorIconBounds : System.Drawing.Rectangle
Public ReadOnly Property ErrorIconBounds As Rectangle

属性值

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.

DataGridView.ShowCellErrors 属性为时 false ,此属性的值为 EmptyWhen 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 类型,此值始终为 EmptyFor the base DataGridViewCell type, this value is always Empty.

适用于

另请参阅