DataGridViewTextBoxCell.Paint Metod

Definition

Målar den aktuella DataGridViewCell.

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);
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)

Parametrar

graphics
Graphics

Används Graphics för att måla DataGridViewCell.

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 det DataGridViewCell som målas.

rowIndex
Int32

Radindexet för cellen som målas.

cellState
DataGridViewElementStates

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

value
Object

Data för den DataGridViewCell som målas.

formattedValue
Object

Formaterade data för den DataGridViewCell 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

Se även