DataGridViewCell.PaintErrorIcon 方法

定义

绘制当前 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);
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

用于绘制边框的 Graphics

clipBounds
Rectangle

一个 Rectangle,表示需要重新绘制的 DataGridView 区域。

cellValueBounds
Rectangle

环绕单元格的内容区域的边框 Rectangle

errorText
String

与单元格关联的错误消息。

注解

参数 errorText 指示存在错误。 如果 errorTextnullString.Empty,则 PaintErrorIcon 该方法不执行任何工作。

适用于

另请参阅