DataGridViewButtonCell.Paint 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
繪製當前的 DataGridViewButtonCell。
protected:
override void Paint(System::Drawing::Graphics ^ graphics, System::Drawing::Rectangle clipBounds, System::Drawing::Rectangle cellBounds, int rowIndex, System::Windows::Forms::DataGridViewElementStates elementState, System::Object ^ value, System::Object ^ formattedValue, System::String ^ errorText, System::Windows::Forms::DataGridViewCellStyle ^ cellStyle, System::Windows::Forms::DataGridViewAdvancedBorderStyle ^ advancedBorderStyle, System::Windows::Forms::DataGridViewPaintParts paintParts);
protected override void Paint(System.Drawing.Graphics graphics, System.Drawing.Rectangle clipBounds, System.Drawing.Rectangle cellBounds, int rowIndex, System.Windows.Forms.DataGridViewElementStates elementState, object value, object formattedValue, string errorText, System.Windows.Forms.DataGridViewCellStyle cellStyle, System.Windows.Forms.DataGridViewAdvancedBorderStyle advancedBorderStyle, System.Windows.Forms.DataGridViewPaintParts paintParts);
protected override void Paint(System.Drawing.Graphics graphics, System.Drawing.Rectangle clipBounds, System.Drawing.Rectangle cellBounds, int rowIndex, System.Windows.Forms.DataGridViewElementStates elementState, object? value, object? formattedValue, string? errorText, System.Windows.Forms.DataGridViewCellStyle cellStyle, System.Windows.Forms.DataGridViewAdvancedBorderStyle advancedBorderStyle, System.Windows.Forms.DataGridViewPaintParts paintParts);
override this.Paint : System.Drawing.Graphics * System.Drawing.Rectangle * System.Drawing.Rectangle * int * System.Windows.Forms.DataGridViewElementStates * obj * obj * string * System.Windows.Forms.DataGridViewCellStyle * System.Windows.Forms.DataGridViewAdvancedBorderStyle * System.Windows.Forms.DataGridViewPaintParts -> unit
Protected Overrides Sub Paint (graphics As Graphics, clipBounds As Rectangle, cellBounds As Rectangle, rowIndex As Integer, elementState As DataGridViewElementStates, value As Object, formattedValue As Object, errorText As String, cellStyle As DataGridViewCellStyle, advancedBorderStyle As DataGridViewAdvancedBorderStyle, paintParts As DataGridViewPaintParts)
參數
- clipBounds
- Rectangle
Rectangle A代表需要重新粉刷的區域DataGridView。
- rowIndex
- Int32
就是被繪製的格子的列索引。
- elementState
- DataGridViewElementStates
一個位元組合 DataGridViewElementStates 的值,指定儲存格的狀態。
- value
- Object
就是被繪製的細胞資料。
- formattedValue
- Object
就是正在繪製的儲存格格式化資料。
- errorText
- String
一個與該小區相關的錯誤訊息。
- cellStyle
- DataGridViewCellStyle
DataGridViewCellStyle包含儲存格的格式與樣式資訊。
- advancedBorderStyle
- DataGridViewAdvancedBorderStyle
DataGridViewAdvancedBorderStyle A 包含被繪製格子的邊框樣式。
- paintParts
- DataGridViewPaintParts
以位元組合 DataGridViewPaintParts 的數值,指定需要繪製儲存格的哪些部分。