[]
        
(Showing Draft Content)

FarPoint.Win.Spread.SheetView.GetPreferredColumnWidth

GetPreferredColumnWidth Method

GetPreferredColumnWidth(int)

Gets the width of the widest cell (based on text content) in the specified column on this sheet.

Declaration
public float GetPreferredColumnWidth(int column)
Public Function GetPreferredColumnWidth(column As Integer) As Single
Parameters
Type Name Description
int column

Column index

Returns
Type Description
float

GetPreferredColumnWidth(int, bool)

Gets the width of the widest cell (based on text content) in the specified column on this sheet.

Declaration
public float GetPreferredColumnWidth(int column, bool ignoreHeaders)
Public Function GetPreferredColumnWidth(column As Integer, ignoreHeaders As Boolean) As Single
Parameters
Type Name Description
int column

Column index

bool ignoreHeaders

Whether to ignore column header cells

Returns
Type Description
float

GetPreferredColumnWidth(int, bool, bool)

Gets the width of the widest cell (based on text content) in the specified column on this sheet.

Declaration
public float GetPreferredColumnWidth(int column, bool ignoreHeaders, bool ignoreSpans)
Public Function GetPreferredColumnWidth(column As Integer, ignoreHeaders As Boolean, ignoreSpans As Boolean) As Single
Parameters
Type Name Description
int column

Column index

bool ignoreHeaders

Whether to ignore column header cells

bool ignoreSpans

Whether to ignore spans

Returns
Type Description
float

GetPreferredColumnWidth(int, bool, bool, bool)

Gets the width of the widest cell (based on text content) in the specified column on this sheet.

Declaration
public float GetPreferredColumnWidth(int column, bool ignoreHeaders, bool ignoreSpans, bool excludeWordWrap)
Public Function GetPreferredColumnWidth(column As Integer, ignoreHeaders As Boolean, ignoreSpans As Boolean, excludeWordWrap As Boolean) As Single
Parameters
Type Name Description
int column

Column index

bool ignoreHeaders

Whether to ignore column header cells

bool ignoreSpans

Whether to ignore spans

bool excludeWordWrap

Whether to exclude cells with wrapped contents

Returns
Type Description
float
Remarks

A cell has wrapped contents (text that wraps to multiple lines) when the renderer in the composite style for the cell implements IWordWrapSupport interface and its WordWrap property returns true.

GetPreferredColumnWidth(int, bool, bool, bool, bool)

Gets the width of the widest cell (based on text content) in the specified column on this sheet.

Declaration
public float GetPreferredColumnWidth(int column, bool ignoreHeaders, bool ignoreSpans, bool excludeWordWrap, bool ignoreTable)
Public Function GetPreferredColumnWidth(column As Integer, ignoreHeaders As Boolean, ignoreSpans As Boolean, excludeWordWrap As Boolean, ignoreTable As Boolean) As Single
Parameters
Type Name Description
int column

Column index

bool ignoreHeaders

Whether to ignore column header cells

bool ignoreSpans

Whether to ignore spans

bool excludeWordWrap

Whether to exclude cells with wrapped contents

bool ignoreTable

Whether to ignore measure cells in table can have special object likes table header filter button

Returns
Type Description
float
Remarks

A cell has wrapped contents (text that wraps to multiple lines) when the renderer in the composite style for the cell implements IWordWrapSupport interface and its WordWrap property returns true.

GetPreferredColumnWidth(int, PreferredSizeColumnOptions)

Gets the width of the widest cell (based on text content) in the specified column on this sheet.

Declaration
public float GetPreferredColumnWidth(int column, PreferredSizeColumnOptions flags)
Public Function GetPreferredColumnWidth(column As Integer, flags As PreferredSizeColumnOptions) As Single
Parameters
Type Name Description
int column

Column index

PreferredSizeColumnOptions flags

Options when getting the preferred width

Returns
Type Description
float
Remarks

A cell has wrapped contents (text that wraps to multiple lines) when the renderer in the composite style for the cell implements IWordWrapSupport interface and its WordWrap property returns true.