Link Search Menu Expand Document

SSpread.MaxTextColWidth Property

Get the width required to display the text set in the column.

This property is an Index Property. Specify the column number for the index.

This property is read-only.

Finds the column width required to display the text based on the data and font size set for the specified column. The current column width is used as is for cells displayed in multiple rows by the TypeEditMultiLine and TypeTextWordWrap property.

You can display all the text in that column by setting the value of this property to the ColWidth property.

The row height can be obtained with the MaxTextRowHeight property. The MaxTextCellHeight and MaxTextCellWidth properties allow you to get the optimal size for each cell.

Example of usage

Col = 2;
Row = 3;
Text = "Biz/Browser";
Row = 4;
Text = "Biz/Designer";
FontSize = 16;
print(MaxTextColWidth(2), "\n");
ColWidth(2) = MaxTextColWidth(2);

Related Items
ColWidth, MaxTextCellHeight, MaxTextCellWidth, MaxTextRowHeight property