DataGridViewCell.PaintErrorIcon(Graphics, Rectangle, Rectangle, String) DataGridViewCell.PaintErrorIcon(Graphics, Rectangle, Rectangle, String) DataGridViewCell.PaintErrorIcon(Graphics, Rectangle, Rectangle, String) Method

定義

繪製目前 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

參數

graphics
Graphics Graphics Graphics

用來繪製界限的 GraphicsThe Graphics used to paint the border.

clipBounds
Rectangle Rectangle Rectangle

Rectangle,表示需要重新繪製的 DataGridView 區域。A Rectangle that represents the area of the DataGridView that needs to be repainted.

cellValueBounds
Rectangle Rectangle Rectangle

傳回圍住儲存格內容區域的周框 RectangleThe bounding Rectangle that encloses the cell's content area.

errorText
String String String

與儲存格關聯的錯誤訊息。An error message that is associated with the cell.

備註

errorText參數會指示錯誤的存在。The errorText parameter signals the existence of an error. 如果errorTextnull或,String.EmptyPaintErrorIcon方法不會執行任何操作。If errorText is null or String.Empty, the PaintErrorIcon method does nothing.

適用於

另請參閱