Base Combo Box CellGet Preferred Size Method
Calculates the preferred size, in pixels, of the cell
Definition
Namespace: EWSoftware.ListControls.DataGridViewControls
Assembly: EWSoftware.ListControls (in EWSoftware.ListControls.dll) Version: 2024.12.31.0
The preferred cell size in pixels
Assembly: EWSoftware.ListControls (in EWSoftware.ListControls.dll) Version: 2024.12.31.0
C#
protected override Size GetPreferredSize(
Graphics graphics,
DataGridViewCellStyle cellStyle,
int rowIndex,
Size constraintSize
)VB
Protected Overrides Function GetPreferredSize (
graphics As Graphics,
cellStyle As DataGridViewCellStyle,
rowIndex As Integer,
constraintSize As Size
) As SizeC++
protected:
virtual Size GetPreferredSize(
Graphics^ graphics,
DataGridViewCellStyle^ cellStyle,
int rowIndex,
Size constraintSize
) overrideF#
abstract GetPreferredSize :
graphics : Graphics *
cellStyle : DataGridViewCellStyle *
rowIndex : int *
constraintSize : Size -> Size
override GetPreferredSize :
graphics : Graphics *
cellStyle : DataGridViewCellStyle *
rowIndex : int *
constraintSize : Size -> Size Parameters
- graphics Graphics
- The graphics context for the cell
- cellStyle DataGridViewCellStyle
- The cell style
- rowIndex Int32
- The index of the cell's parent row
- constraintSize Size
- The cell's maximum allowable size
Return Value
SizeThe preferred cell size in pixels