Rating CellGet Content Bounds(Graphics, Data Grid View Cell Style, Int 32) Method
Returns the bounding rectangle that encloses the cell's content area, which is calculated using the
specified graphics context and cell style.
Definition
Namespace: EWSoftware.ListControls.DataGridViewControls
Assembly: EWSoftware.ListControls (in EWSoftware.ListControls.dll) Version: 2024.12.31.0
The Rectangle that bounds the cell's contents
Assembly: EWSoftware.ListControls (in EWSoftware.ListControls.dll) Version: 2024.12.31.0
C#
protected override Rectangle GetContentBounds(
Graphics graphics,
DataGridViewCellStyle cellStyle,
int rowIndex
)VB
Protected Overrides Function GetContentBounds (
graphics As Graphics,
cellStyle As DataGridViewCellStyle,
rowIndex As Integer
) As RectangleC++
protected:
virtual Rectangle GetContentBounds(
Graphics^ graphics,
DataGridViewCellStyle^ cellStyle,
int rowIndex
) overrideF#
abstract GetContentBounds :
graphics : Graphics *
cellStyle : DataGridViewCellStyle *
rowIndex : int -> Rectangle
override GetContentBounds :
graphics : Graphics *
cellStyle : DataGridViewCellStyle *
rowIndex : int -> Rectangle Parameters
- graphics Graphics
- The graphics context
- cellStyle DataGridViewCellStyle
- The cell style to apply to the cell
- rowIndex Int32
- The index of the cell's parent row
Return Value
RectangleThe Rectangle that bounds the cell's contents
Remarks
For null cells, a default rectangle is returned so that mouse clicks near its center will
initiate editing.