DataGridViewRowHeaderCell.Paint 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
繪製目前的 DataGridViewRowHeaderCell。
protected:
override void Paint(System::Drawing::Graphics ^ graphics, System::Drawing::Rectangle clipBounds, System::Drawing::Rectangle cellBounds, int rowIndex, System::Windows::Forms::DataGridViewElementStates cellState, 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 cellState, 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, cellState As DataGridViewElementStates, value As Object, formattedValue As Object, errorText As String, cellStyle As DataGridViewCellStyle, advancedBorderStyle As DataGridViewAdvancedBorderStyle, paintParts As DataGridViewPaintParts)
參數
- graphics
- Graphics
用來繪製 DataGridViewCell 的 Graphics。
- clipBounds
- Rectangle
Rectangle,代表需要重新繪製的 DataGridView 區域。
- cellBounds
- Rectangle
Rectangle,包含要繪製 DataGridViewCell 的界限。
- rowIndex
- Int32
正在繪製的儲存格資料列索引。
- cellState
- DataGridViewElementStates
DataGridViewElementStates 值的位元組合,指定儲存格的狀態。
- value
- Object
正在繪製之 DataGridViewCell 的資料。
- formattedValue
- Object
正在繪製之DataGridViewCell 的格式化資料。
- errorText
- String
與儲存格關聯的錯誤訊息。
- cellStyle
- DataGridViewCellStyle
DataGridViewCellStyle,其中包含有關儲存格的格式化和樣式資訊。
- advancedBorderStyle
- DataGridViewAdvancedBorderStyle
DataGridViewAdvancedBorderStyle,包含正在繪製之儲存格的邊框樣式。
- paintParts
- DataGridViewPaintParts
DataGridViewPaintParts 值的位元組合,指定儲存格需要繪製的部分。