TreeView for WinForms | ComponentOne
C1.Win.TreeView Namespace / C1TreeView Class / GetColumnPreferredWidth Method / GetColumnPreferredWidth(Int32) Method
The index of the column whose preferred width is to be calculated.

In This Topic
    GetColumnPreferredWidth(Int32) Method
    In This Topic
    Calculates the minimum width of the C1TreeColumn that will fit the currently displayed content.
    Syntax
    'Declaration
     
    
    Public Overloads Function GetColumnPreferredWidth( _
       ByVal columnIndex As Integer _
    ) As Integer
    public int GetColumnPreferredWidth( 
       int columnIndex
    )

    Parameters

    columnIndex
    The index of the column whose preferred width is to be calculated.

    Return Value

    The minimum width of the C1TreeColumn in Columns with given columnIndex that will fit the currently displayed content.
    Exceptions
    ExceptionDescription
    Thrown if columnIndex is outside of the Columns bounds.
    See Also