DataGridViewColumnHeaderCell.Paint Metod

Definition

Målar den aktuella DataGridViewColumnHeaderCell.

protected:
 override void Paint(System::Drawing::Graphics ^ graphics, System::Drawing::Rectangle clipBounds, System::Drawing::Rectangle cellBounds, int rowIndex, System::Windows::Forms::DataGridViewElementStates dataGridViewElementState, 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 dataGridViewElementState, 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 dataGridViewElementState, 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, dataGridViewElementState As DataGridViewElementStates, value As Object, formattedValue As Object, errorText As String, cellStyle As DataGridViewCellStyle, advancedBorderStyle As DataGridViewAdvancedBorderStyle, paintParts As DataGridViewPaintParts)

Parametrar

graphics
Graphics

Den Graphics som används för att måla cellen.

clipBounds
Rectangle

En Rectangle som representerar området för DataGridView det som måste målas om.

cellBounds
Rectangle

En Rectangle som innehåller gränserna för cellen som målas.

rowIndex
Int32

Radindexet för cellen som målas.

dataGridViewElementState
DataGridViewElementStates

En bitvis kombination av DataGridViewElementStates värden som anger cellens tillstånd.

value
Object

Data för cellen som målas.

formattedValue
Object

De formaterade data i cellen som målas.

errorText
String

Ett felmeddelande som är associerat med cellen.

cellStyle
DataGridViewCellStyle

En DataGridViewCellStyle som innehåller formatering och formateringsinformation om cellen.

advancedBorderStyle
DataGridViewAdvancedBorderStyle

En DataGridViewAdvancedBorderStyle som innehåller kantlinjeformat för cellen som målas.

paintParts
DataGridViewPaintParts

En bitvis kombination av de DataGridViewPaintParts värden som anger vilka delar av cellen som måste målas.

Gäller för