[]
• new Comment(text?
)
Represents a comment.
example
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.autoSize(true);
activeSheet.getCell(5,5).comment(comment);
Name | Type |
---|---|
text? |
string |
▸ autoSize(value?
): any
Gets or sets whether the comment automatically sizes based on its content.
example
//This example uses the autoSize 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.autoSize(true);
activeSheet.getCell(5,5).comment(comment);
Name | Type | Description |
---|---|---|
value? |
boolean |
Whether the comment automatically sizes. |
any
If no value is set, returns whether the comment automatically sizes; otherwise, returns the comment.
▸ backColor(value?
): any
Gets or sets the background color of the comment.
example
//This example sets the backColor 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);
activeSheet.getCell(5,5).comment(comment);
Name | Type | Description |
---|---|---|
value? |
string |
The background color of the comment. |
any
If no value is set, returns the background color of the comment; otherwise, returns the comment.
▸ borderColor(value?
): any
Gets or sets the border color for the comment.
example
//This example sets the borderColor 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.borderWidth(2);
comment.borderStyle("dotted");
comment.borderColor("red");
activeSheet.getCell(5,5).comment(comment);
activeSheet.suspendPaint();
activeSheet.resumePaint();
Name | Type | Description |
---|---|---|
value? |
string |
The border color for the comment. |
any
If no value is set, returns the border color for the comment; otherwise, returns the comment.
▸ borderStyle(value?
): any
Gets or sets the border style for the comment.
example
//This example sets the borderStyle 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.borderWidth(2);
comment.borderStyle("dotted");
comment.borderColor("red");
activeSheet.getCell(5,5).comment(comment);
activeSheet.suspendPaint();
activeSheet.resumePaint();
Name | Type | Description |
---|---|---|
value? |
string |
The border style for the comment. |
any
If no value is set, returns the border style for the comment; otherwise, returns the comment.
▸ borderWidth(value?
): any
Gets or sets the border width for the comment.
example
//This example sets the borderWidth 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.borderWidth(2);
comment.borderStyle("dotted");
comment.borderColor("red");
activeSheet.getCell(5,5).comment(comment);
activeSheet.suspendPaint();
activeSheet.resumePaint();
Name | Type | Description |
---|---|---|
value? |
number |
The border width for the comment. |
any
If no value is set, returns the border width for the comment; otherwise, returns the comment.
▸ commentState(value?
): any
Gets or sets the state of the comment.
example
//This example gets the comment state.
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);
activeSheet.getCell(5,5).comment(comment);
alert(comment.commentState());
Name | Type | Description |
---|---|---|
value? |
CommentState |
The state of the comment. |
any
If no value is set, returns the state of the comment; otherwise, returns the comment.
▸ displayMode(value?
): any
Gets or sets the display mode for the comment.
example
//This example sets the displayMode 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);
activeSheet.getCell(5,5).comment(comment);
Name | Type | Description |
---|---|---|
value? |
DisplayMode |
The display mode for the comment. |
any
If no value is set, returns the display mode for the comment; otherwise, returns the comment.
▸ dynamicMove(value?
): any
Gets or sets whether the comment dynamically moves.
example
//This example uses the dynamicMove 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.dynamicMove(true);
comment.dynamicSize(true);
activeSheet.getCell(5,5).comment(comment);
Name | Type | Description |
---|---|---|
value? |
boolean |
Whether the comment dynamically moves. |
any
If no value is set, returns whether the comment dynamically moves; otherwise, returns the comment.
▸ dynamicSize(value?
): any
Gets or sets whether the comment is dynamically sized.
example
//This example uses the dynamicSize 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.dynamicMove(true);
comment.dynamicSize(true);
activeSheet.getCell(5,5).comment(comment);
Name | Type | Description |
---|---|---|
value? |
boolean |
Whether the comment is dynamically sized. |
any
If no value is set, returns whether the comment is dynamically sized; otherwise, returns the comment.
▸ fontFamily(value?
): any
Gets or sets the font family for the comment.
example
//This example uses the fontFamily 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.fontFamily("Comic Sans MS");
comment.fontSize("10pt");
activeSheet.getCell(5,5).comment(comment);
Name | Type | Description |
---|---|---|
value? |
string |
The font family for the comment. |
any
If no value is set, returns the font family for the comment; otherwise, returns the comment.
▸ fontSize(value?
): any
Gets or sets the font size for the comment. Valid value is numbers followed by "pt" (required), such as "12pt".
example
//This example uses the fontSize 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.fontFamily("Comic Sans MS");
comment.fontSize("10pt");
activeSheet.getCell(5,5).comment(comment);
Name | Type | Description |
---|---|---|
value? |
string |
The font size for the comment. |
any
If no value is set, returns the font size for the comment; otherwise, returns the comment.
▸ fontStyle(value?
): any
Gets or sets the font style of the comment.
example
//This example uses the fontStyle 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.fontFamily("Comic Sans MS");
comment.fontStyle("normal");
comment.fontWeight("normal");
activeSheet.getCell(5,5).comment(comment);
Name | Type | Description |
---|---|---|
value? |
string |
The font style of the comment. |
any
If no value is set, returns the font style of the comment; otherwise, returns the comment.
▸ fontWeight(value?
): any
Gets or sets the font weight for the comment.
example
//This example uses the fontWeight 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.fontFamily("Comic Sans MS");
comment.fontStyle("normal");
comment.fontWeight("normal");
activeSheet.getCell(5,5).comment(comment);
Name | Type | Description |
---|---|---|
value? |
string |
The font weight for the comment. |
any
If no value is set, returns the font weight for the comment; otherwise, returns the comment.
▸ foreColor(value?
): any
Gets or sets the text color for the comment.
example
//This example sets the foreColor 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);
activeSheet.getCell(5,5).comment(comment);
Name | Type | Description |
---|---|---|
value? |
string |
The text color for the comment. |
any
If no value is set, returns the text color for the comment; otherwise, returns the comment.
▸ height(value?
): any
Gets or sets the height of the comment.
example
//This example sets the height 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.height(50);
comment.width(90);
activeSheet.getCell(5,5).comment(comment);
activeSheet.suspendPaint();
activeSheet.resumePaint();
Name | Type | Description |
---|---|---|
value? |
number |
The height of the comment. |
any
If no value is set, returns the height of the comment; otherwise, returns the comment.
▸ horizontalAlign(value?
): any
Gets or sets the horizontal alignment of 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);
Name | Type | Description |
---|---|---|
value? |
HorizontalAlign |
The horizontal alignment of the comment. |
any
If no value is set, returns the horizontal alignment of the comment; otherwise, returns the comment.
▸ indicatorColor(value?
): any
Gets or sets the indicatorColor for the comment.
example
//This example uses the indicatorColor method.
var comment = new GC.Spread.Sheets.Comments.Comment();
var color1 = "red";
var color2 = "#FFFFFF";
var color2 = "rgba(255, 255, 255, 0.01)";
comment.indicatorColor(color1);
activeSheet.comments.add(5, 5, comment);
activeSheet.getCell(5,5).comment(comment);
Name | Type | Description |
---|---|---|
value? |
string |
The indicatorColor for the comment. |
any
If no value is set, returns the color for the commentAdorner; otherwise, returns the comment.
▸ indicatorSize(value?
): any
Gets or sets the indicatorColor for the comment.
example
//This example uses the indicatorColor method.
var comment = new GC.Spread.Sheets.Comments.Comment();
comment.indicatorSize(6);
activeSheet.comments.add(5, 5, comment);
activeSheet.getCell(5,5).comment(comment);
Name | Type | Description |
---|---|---|
value? |
number |
The indicatorColor for the comment. |
any
If no value is set, returns the size for the commentAdorner; otherwise, returns the comment.
▸ location(value?
): any
Gets or sets the location of the comment.
example
//This example uses the location 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.location(new GC.Spread.Sheets.Point(10, 10));
activeSheet.getCell(5,5).comment(comment);
Name | Type | Description |
---|---|---|
value? |
Point |
The location of the comment. |
any
If no value is set, returns the location of the comment; otherwise, returns the comment.
▸ lockText(value?
): any
Gets or sets the locked text for the comment.
example
//This example uses the lockText method.
var comment = new GC.Spread.Sheets.Comments.Comment();
comment.text("new comment!");
comment.backColor("yellow");
comment.foreColor("green");
comment.lockText(false);
comment.locked(false);
comment.displayMode(GC.Spread.Sheets.Comments.DisplayMode.alwaysShown);
activeSheet.options.isProtected = true;
activeSheet.getCell(5,5).comment(comment);
Name | Type | Description |
---|---|---|
value? |
boolean |
The locked text for the comment. |
any
If no value is set, returns the locked text for the comment; otherwise, returns the comment.
▸ locked(value?
): any
Gets or sets the locked setting for the comment.
example
//This example uses the locked method.
var comment = new GC.Spread.Sheets.Comments.Comment();
comment.text("new comment!");
comment.backColor("yellow");
comment.foreColor("green");
comment.lockText(false);
comment.locked(false);
comment.displayMode(GC.Spread.Sheets.Comments.DisplayMode.alwaysShown);
activeSheet.options.isProtected = true;
activeSheet.getCell(5,5).comment(comment);
Name | Type | Description |
---|---|---|
value? |
boolean |
The locked setting for the comment. |
any
If no value is set, returns the locked setting for the comment; otherwise, returns the comment.
▸ opacity(value?
): any
Gets or sets the opacity of the comment.
example
//This example sets the opacity.
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.opacity(10);
activeSheet.getCell(5,5).comment(comment);
Name | Type | Description |
---|---|---|
value? |
number |
The opacity of the comment. |
any
If no value is set, returns the opacity of the comment; otherwise, returns the comment.
▸ padding(value?
): any
Gets or sets the padding for the comment.
example
//This example uses the padding 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.padding(new GC.Spread.Sheets.Comments.Padding(2, 2, 2, 2));
activeSheet.getCell(5,5).comment(comment);
Name | Type | Description |
---|---|---|
value? |
Padding |
The padding for the comment. |
any
If no value is set, returns the padding for the comment; otherwise, returns the comment.
▸ showShadow(value?
): any
Gets or sets whether the comment displays a shadow.
example
//This example uses the showShadow 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.borderWidth(2);
comment.borderStyle("dotted");
comment.borderColor("red");
comment.showShadow(true);
activeSheet.getCell(5,5).comment(comment);
activeSheet.suspendPaint();
activeSheet.resumePaint();
Name | Type | Description |
---|---|---|
value? |
boolean |
Whether the comment displays a shadow. |
any
If no value is set, returns whether the comment displays a shadow; otherwise, returns the comment.
▸ text(value?
): any
Gets or sets the text of the comment.
example
//This example sets the text 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);
activeSheet.getCell(5,5).comment(comment);
Name | Type | Description |
---|---|---|
value? |
string |
The text of the comment. |
any
If no value is set, returns the text of the comment; otherwise, returns the comment.
▸ textDecoration(value?
): any
Gets or sets the text decoration for the comment.
example
//This example uses the textDecoration 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.textDecoration(GC.Spread.Sheets.TextDecorationType.underline);
activeSheet.getCell(5,5).comment(comment);
activeSheet.suspendPaint();
activeSheet.resumePaint();
Name | Type | Description |
---|---|---|
value? |
TextDecorationType |
The text decoration for the comment. |
any
If no value is set, returns the text decoration for the comment; otherwise, returns the comment.
▸ width(value?
): any
Gets or sets the width of the comment.
example
//This example sets the width 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.height(50);
comment.width(90);
activeSheet.getCell(5,5).comment(comment);
activeSheet.suspendPaint();
activeSheet.resumePaint();
Name | Type | Description |
---|---|---|
value? |
number |
The width of the comment. |
any
If no value is set, returns the width of the comment; otherwise, returns the comment.
▸ zIndex(value?
): any
Gets or sets the z-index of the comment.
example
//This example gets the index.
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);
activeSheet.getCell(5,5).comment(comment);
alert(comment.zIndex());
Name | Type | Description |
---|---|---|
value? |
number |
The z-index of the comment. |
any
If no value is set, returns the z-index of the comment; otherwise, returns the comment.