DataGridViewCell.PaintErrorIcon(Graphics, Rectangle, Rectangle, String) 方法

定义

绘制当前 DataGridViewCell 的错误图标。Paints the error icon of the current DataGridViewCell.

protected:
 virtual void PaintErrorIcon(System::Drawing::Graphics ^ graphics, System::Drawing::Rectangle clipBounds, System::Drawing::Rectangle cellValueBounds, System::String ^ errorText);
protected virtual void PaintErrorIcon (System.Drawing.Graphics graphics, System.Drawing.Rectangle clipBounds, System.Drawing.Rectangle cellValueBounds, string errorText);
abstract member PaintErrorIcon : System.Drawing.Graphics * System.Drawing.Rectangle * System.Drawing.Rectangle * string -> unit
override this.PaintErrorIcon : System.Drawing.Graphics * System.Drawing.Rectangle * System.Drawing.Rectangle * string -> unit
Protected Overridable Sub PaintErrorIcon (graphics As Graphics, clipBounds As Rectangle, cellValueBounds As Rectangle, errorText As String)

参数

graphics
Graphics

用于绘制边框的 GraphicsThe Graphics used to paint the border.

clipBounds
Rectangle

一个 Rectangle,表示需要重新绘制的 DataGridView 区域。A Rectangle that represents the area of the DataGridView that needs to be repainted.

cellValueBounds
Rectangle

环绕单元格的内容区域的边框 RectangleThe bounding Rectangle that encloses the cell's content area.

errorText
String

与单元格关联的错误消息。An error message that is associated with the cell.

注解

errorText参数指示存在错误。The errorText parameter signals the existence of an error. 如果 errorTextnullString.Empty ,则此 PaintErrorIcon 方法不执行任何操作。If errorText is null or String.Empty, the PaintErrorIcon method does nothing.

适用于

另请参阅