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 方法不會執行任何動作。

適用於

另請參閱