Spread.Sheets Documentation
shrinkToFit Method
Set to true to have the cell shrink text to fit.
Gets or sets whether the cell shrinks the text to fit the cell size.
Syntax
var instance = new GC.Spread.Sheets.CellRange(sheet, row, col, rowCount, colCount, sheetArea);
var returnValue; // Type: any
returnValue = instance.shrinkToFit(value);
function shrinkToFit( 
   value : boolean
) : any;

Parameters

value
Set to true to have the cell shrink text to fit.

Return Value

If no value is set, returns whether the cell shrinks the text to fit; otherwise, returns the cell.
Example
The following examples use the shrinkToFit method.
activeSheet.getRange(2,-1, 1, -1, GC.Spread.Sheets.SheetArea.viewport).shrinkToFit(false);
activeSheet.setText(2,0,"This is a test");
activeSheet.getCell(1,1).shrinkToFit(true);
activeSheet.getRange(-1, 3, -1, 1, GC.Spread.Sheets.SheetArea.viewport).shrinkToFit(true);
See Also

Reference

CellRange type

 

 


Copyright © GrapeCity, inc. All rights reserved.

Send comments on this topic.