Spread 8.0 Documentation
MaxTextCellHeight Property
Support Options
ActiveX Reference > ActiveX Properties > MaxTextCellHeight Property

Glossary Item Box

MaxTextCellHeight Property


See Also    DLL    Example

Applies To

fpSpread control

Description

Returns the minimum height necessary to display all the text within the specified cell. This property is available at run time only.

Syntax

C++

double CSpreadSheet::GetMaxTextCellHeight( );

Visual Basic

[form.]fpSpread.MaxTextCellHeight

Remarks

This setting is returned for the current sheet setting unless you first set the Sheet property to specify the sheet for which you are returning the property. Use the Col and Row properties to specify the cell for which to return the height. Then, set the RowHeight property equal to the value returned from this property to size the row to display all the text in the specified cell.

For edit and static text cells, the value returned varies depending on the setting of the TypeEditMultiLine property (for edit cells) or the TypeTextWordWrap property (for static text cells), as listed in the following table.

TypeEditMultiLine or TypeTextWordWrap property setting Value returned
True The minimum row height necessary to display all the text in the cell given the current column width and font size
False The minimum row height necessary to display one line of text given the current font size

You can base the row height on the highest text in the row instead of the text in the specified cell by using the MaxTextRowHeight property.

You can perform similar calculations for the column width using the MaxTextCellWidth or MaxTextColWidth property.

Data Type

Double

See Also

Resizing a Cell to Fit the Tallest Data

MaxTextCellWidth, MaxTextColWidth, MaxTextRowHeight, RowHeight, Sheet, TypeEditMultiLine, TypeTextWordWrap properties

DLL Correspondence

SSGetMaxTextCellSize function

Copyright © GrapeCity, inc. All rights reserved.