SpreadJS Documentation
horizontalAlign Method
GC.Spread.Sheets.Comments Namespace > Comment class : horizontalAlign Method
The horizontal alignment of the comment.
Gets or sets the horizontal alignment of the comment.
Syntax
var instance = new GC.Spread.Sheets.Comments.Comment(text);
var returnValue; // Type: any
returnValue = instance.horizontalAlign(value);
function horizontalAlign( 
   value : HorizontalAlign
) : any;

Parameters

value
The horizontal alignment of the comment.

Return Value

If no value is set, returns the horizontal alignment of the comment; otherwise, returns the comment.
Example
This example uses the horizontalAlign method.
var comment = new GC.Spread.Sheets.Comments.Comment();
comment.text("new comment!");
comment.backColor("yellow");
comment.foreColor("green");
comment.displayMode(GC.Spread.Sheets.Comments.DisplayMode.alwaysShown);
comment.horizontalAlign(GC.Spread.Sheets.HorizontalAlign.center);
activeSheet.getCell(5,5).comment(comment);
See Also

Reference

Comment class