BaseImageCellPaint Method

This is overridden to paint the cell value based on whether or not it is in edit mode

Definition

Namespace: EWSoftware.ListControls.DataGridViewControls
Assembly: EWSoftware.ListControls (in EWSoftware.ListControls.dll) Version: 2023.4.9.0
protected override void Paint(
	Graphics graphics,
	Rectangle clipBounds,
	Rectangle cellBounds,
	int rowIndex,
	DataGridViewElementStates elementState,
	Object value,
	Object formattedValue,
	string errorText,
	DataGridViewCellStyle cellStyle,
	DataGridViewAdvancedBorderStyle advancedBorderStyle,
	DataGridViewPaintParts paintParts
)

Parameters

graphics  Graphics
The graphics object
clipBounds  Rectangle
The clip bounds
cellBounds  Rectangle
The cell bounds
rowIndex  Int32
The row index of the cell
elementState  DataGridViewElementStates
The cell state
value  Object
The value of the cell
formattedValue  Object
The formatted value for the cell
errorText  String
The error text associated with the cell, if any
cellStyle  DataGridViewCellStyle
The cell style
advancedBorderStyle  DataGridViewAdvancedBorderStyle
The advanced border style
paintParts  DataGridViewPaintParts
The parts of the cell to paint

Remarks

This also fixes a bug in the base image cell class by painting the cell background when ImageLayout is set to Stretch.

See Also