Xceed Grid for WinForms v4.3 Documentation
Xceed.Grid.v4.3 Assembly / Xceed.Grid Namespace / ColumnManagerCell Class / GetFittedDisplayHeight Method
An AutoHeightMode value indicating in regards to what factors the fitted height of the cell will be calculated.
A value, in pixels, representing the display width of the cell. The display width of the cell is its width without the borders.
The System.Drawing.Graphics object used to paint the cell.
true if the cell is being printed; false otherwise.


In This Topic
    GetFittedDisplayHeight Method (ColumnManagerCell)
    In This Topic
    Retrieves the fitted height of the cell in pixels.
    Syntax
    'Declaration
     
    Protected Friend Overrides Function GetFittedDisplayHeight( _
       ByVal mode As AutoHeightMode, _
       ByVal cellDisplayWidth As Integer, _
       ByVal graphics As Graphics, _
       ByVal printing As Boolean _
    ) As Integer
    'Usage
     
    Dim instance As ColumnManagerCell
    Dim mode As AutoHeightMode
    Dim cellDisplayWidth As Integer
    Dim graphics As Graphics
    Dim printing As Boolean
    Dim value As Integer
     
    value = instance.GetFittedDisplayHeight(mode, cellDisplayWidth, graphics, printing)
    protected internal override int GetFittedDisplayHeight( 
       AutoHeightMode mode,
       int cellDisplayWidth,
       Graphics graphics,
       bool printing
    )

    Parameters

    mode
    An AutoHeightMode value indicating in regards to what factors the fitted height of the cell will be calculated.
    cellDisplayWidth
    A value, in pixels, representing the display width of the cell. The display width of the cell is its width without the borders.
    graphics
    The System.Drawing.Graphics object used to paint the cell.
    printing
    true if the cell is being printed; false otherwise.

    Return Value

    The fitted height of the cell in pixels. If mode is set to AutoHeightMode.AllContent and the value of the cell is a null reference (Nothing in Visual Basic), DBNull or System.String.Empty, then the equivalent of calling GetFittedHeight with AutoHeightMode.Minimum is returned.
    Remarks

    The fitted height of the cell is calculated in regards to the current width of its parent column, taking into consideration the WordWrap property only if mode is set to AllContent.

    If the WordWrap property is set to true, then the fitted height of the cell will represent the height needed to display all cell's content appropriately. If the WordWrap property is set to false, then the fitted height of the cell will represent the height needed to display only one line of data in the cell.

    If the parent row's FitHeightToEditors is true, then the height of the cell's editor will be consulted and if its height is greater than the height of the viewer, then the fitted height of the editor will be used.

    Requirements

    Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

    See Also