[]
        
(Showing Draft Content)

C1.Win.TreeView.C1TreeView.GetColumnPreferredWidth

GetColumnPreferredWidth Method

GetColumnPreferredWidth(int)

Calculates the minimum width of the C1TreeColumn that will fit the currently displayed content.

Declaration
public int GetColumnPreferredWidth(int columnIndex)
Parameters
Type Name Description
int columnIndex

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

Returns
Type Description
int

The minimum width of the C1TreeColumn in Columns with given columnIndex that will fit the currently displayed content.

Exceptions
Type Condition
IndexOutOfRangeException

Thrown if columnIndex is outside of the Columns bounds.

GetColumnPreferredWidth(C1TreeColumn)

Calculates the minimum width of the C1TreeColumn that will fit the currently displayed content.

Declaration
public int GetColumnPreferredWidth(C1TreeColumn treeColumn)
Parameters
Type Name Description
C1TreeColumn treeColumn

C1TreeColumn

Returns
Type Description
int

The minimum width of the given column that will fit the currently displayed content.

Exceptions
Type Condition
ArgumentNullException

Thrown if given treecolumn is null.

ArgumentOutOfRangeException

Thrown if given treecolumn doesn't belongs to the Columns collection.