Spread.Sheets Documentation
hAlign Method
The horizontal alignment.
Gets or sets the horizontal alignment of the contents of the cell.
Syntax
var instance = new GC.Spread.Sheets.CellRange(sheet, row, col, rowCount, colCount, sheetArea);
var returnValue; // Type: any
returnValue = instance.hAlign(value);
function hAlign( 
   value : HorizontalAlign
) : any;

Parameters

value
The horizontal alignment.

Return Value

If no value is set, returns the horizontal alignment of the contents of the cell; otherwise, returns the cell.
Example
The following examples set the alignment.
activeSheet.getRange(2, -1, 1, -1, GC.Spread.Sheets.SheetArea.viewport).hAlign(GC.Spread.Sheets.HorizontalAlign.left);
activeSheet.getCell(1,1).hAlign(GC.Spread.Sheets.HorizontalAlign.center);
activeSheet.getRange(-1, 3, -1, 1, GC.Spread.Sheets.SheetArea.viewport).hAlign(GC.Spread.Sheets.HorizontalAlign.right);
Remarks
The default value is HorizontalAlign.center.
See Also

Reference

CellRange type
Setting Cell Alignment and Indentation

 

 


Copyright © GrapeCity, inc. All rights reserved.

Send comments on this topic.