Spread for ASP.NET 13 Product Documentation
FarPoint.Web.Spread Assembly / FarPoint.Web.Spread Namespace / ButtonCellType Class / GetPreferredSize Method
Graphics device interface for painting the cell
Preferred or maximum needed size
Appearance settings
Object that contains the name of the renderer control
Numeric value for zoom factor for scaling the display of the renderer control
Whether to fit the column
Whether to fit the row


In This Topic
    GetPreferredSize Method (ButtonCellType)
    In This Topic
    Gets the preferred (maximum needed) size of the cell for the renderer control.
    Syntax
    'Declaration
     
    Public Overrides Function GetPreferredSize( _
       ByVal g As Graphics, _
       ByVal size As Size, _
       ByVal appearance As Appearance, _
       ByVal value As Object, _
       ByVal zoomFactor As Single, _
       ByVal fitColumn As Boolean, _
       ByVal fitRow As Boolean _
    ) As Size
    'Usage
     
    Dim instance As ButtonCellType
    Dim g As Graphics
    Dim size As Size
    Dim appearance As Appearance
    Dim value As Object
    Dim zoomFactor As Single
    Dim fitColumn As Boolean
    Dim fitRow As Boolean
    Dim value As Size
     
    value = instance.GetPreferredSize(g, size, appearance, value, zoomFactor, fitColumn, fitRow)
    public override Size GetPreferredSize( 
       Graphics g,
       Size size,
       Appearance appearance,
       object value,
       float zoomFactor,
       bool fitColumn,
       bool fitRow
    )

    Parameters

    g
    Graphics device interface for painting the cell
    size
    Preferred or maximum needed size
    appearance
    Appearance settings
    value
    Object that contains the name of the renderer control
    zoomFactor
    Numeric value for zoom factor for scaling the display of the renderer control
    fitColumn
    Whether to fit the column
    fitRow
    Whether to fit the row

    Return Value

    Size object containing the maximum dimension of the cell
    See Also