DataGridViewCell.PaintErrorIcon 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
繪製目前 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)
參數
- clipBounds
- Rectangle
Rectangle,代表需要重新繪製的 DataGridView 區域。
- errorText
- String
與儲存格關聯的錯誤訊息。
備註
參數 errorText
會發出錯誤是否存在的訊號。 如果 為 errorText
null
或 String.Empty ,則 PaintErrorIcon 方法不會執行任何動作。
適用於
另請參閱
- DataGridView
- Paint(Graphics, Rectangle, Rectangle, Int32, DataGridViewElementStates, Object, Object, String, DataGridViewCellStyle, DataGridViewAdvancedBorderStyle, DataGridViewPaintParts)
- PaintBorder(Graphics, Rectangle, Rectangle, DataGridViewCellStyle, DataGridViewAdvancedBorderStyle)
- Graphics
- Rectangle