BaseImageCellPaint Method
This is overridden to paint the cell value based on whether or not it is in edit mode
Namespace: EWSoftware.ListControls.DataGridViewControlsAssembly: 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
)
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
)
protected:
virtual void Paint(
Graphics^ graphics,
Rectangle clipBounds,
Rectangle cellBounds,
int rowIndex,
DataGridViewElementStates elementState,
Object^ value,
Object^ formattedValue,
String^ errorText,
DataGridViewCellStyle^ cellStyle,
DataGridViewAdvancedBorderStyle^ advancedBorderStyle,
DataGridViewPaintParts paintParts
) override
abstract Paint :
graphics : Graphics *
clipBounds : Rectangle *
cellBounds : Rectangle *
rowIndex : int *
elementState : DataGridViewElementStates *
value : Object *
formattedValue : Object *
errorText : string *
cellStyle : DataGridViewCellStyle *
advancedBorderStyle : DataGridViewAdvancedBorderStyle *
paintParts : DataGridViewPaintParts -> unit
override Paint :
graphics : Graphics *
clipBounds : Rectangle *
cellBounds : Rectangle *
rowIndex : int *
elementState : DataGridViewElementStates *
value : Object *
formattedValue : Object *
errorText : string *
cellStyle : DataGridViewCellStyle *
advancedBorderStyle : DataGridViewAdvancedBorderStyle *
paintParts : DataGridViewPaintParts -> unit
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
This also fixes a bug in the base image cell class by painting the cell background when
ImageLayout is set to
Stretch.