# GC.Spread.Sheets.Comments.Comment

## Content

# Class: Comment

[Sheets](../modules/GC.Spread.Sheets).[Comments](../modules/GC.Spread.Sheets.Comments).Comment

## Table of contents

### Constructors

- [constructor](GC.Spread.Sheets.Comments.Comment#constructor)

### Methods

- [autoSize](GC.Spread.Sheets.Comments.Comment#autosize)
- [backColor](GC.Spread.Sheets.Comments.Comment#backcolor)
- [borderColor](GC.Spread.Sheets.Comments.Comment#bordercolor)
- [borderStyle](GC.Spread.Sheets.Comments.Comment#borderstyle)
- [borderWidth](GC.Spread.Sheets.Comments.Comment#borderwidth)
- [commentState](GC.Spread.Sheets.Comments.Comment#commentstate)
- [displayMode](GC.Spread.Sheets.Comments.Comment#displaymode)
- [dynamicMove](GC.Spread.Sheets.Comments.Comment#dynamicmove)
- [dynamicSize](GC.Spread.Sheets.Comments.Comment#dynamicsize)
- [fontFamily](GC.Spread.Sheets.Comments.Comment#fontfamily)
- [fontSize](GC.Spread.Sheets.Comments.Comment#fontsize)
- [fontStyle](GC.Spread.Sheets.Comments.Comment#fontstyle)
- [fontWeight](GC.Spread.Sheets.Comments.Comment#fontweight)
- [foreColor](GC.Spread.Sheets.Comments.Comment#forecolor)
- [height](GC.Spread.Sheets.Comments.Comment#height)
- [horizontalAlign](GC.Spread.Sheets.Comments.Comment#horizontalalign)
- [indicatorColor](GC.Spread.Sheets.Comments.Comment#indicatorcolor)
- [indicatorSize](GC.Spread.Sheets.Comments.Comment#indicatorsize)
- [location](GC.Spread.Sheets.Comments.Comment#location)
- [lockText](GC.Spread.Sheets.Comments.Comment#locktext)
- [locked](GC.Spread.Sheets.Comments.Comment#locked)
- [opacity](GC.Spread.Sheets.Comments.Comment#opacity)
- [padding](GC.Spread.Sheets.Comments.Comment#padding)
- [showShadow](GC.Spread.Sheets.Comments.Comment#showshadow)
- [text](GC.Spread.Sheets.Comments.Comment#text)
- [textDecoration](GC.Spread.Sheets.Comments.Comment#textdecoration)
- [width](GC.Spread.Sheets.Comments.Comment#width)
- [zIndex](GC.Spread.Sheets.Comments.Comment#zindex)

## Constructors

### <a id="constructor" name="constructor"></a> constructor

• **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);
```

#### Parameters

| Name | Type |
| :------ | :------ |
| `text?` | `string` |

## Methods

### <a id="autosize" name="autosize"></a> autoSize

▸ **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);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `value?` | `boolean` | Whether the comment automatically sizes. |

#### Returns

`any`

If no value is set, returns whether the comment automatically sizes; otherwise, returns the comment.

___

### <a id="backcolor" name="backcolor"></a> backColor

▸ **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);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `value?` | `string` | The background color of the comment. |

#### Returns

`any`

If no value is set, returns the background color of the comment; otherwise, returns the comment.

___

### <a id="bordercolor" name="bordercolor"></a> borderColor

▸ **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();
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `value?` | `string` | The border color for the comment. |

#### Returns

`any`

If no value is set, returns the border color for the comment; otherwise, returns the comment.

___

### <a id="borderstyle" name="borderstyle"></a> borderStyle

▸ **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();
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `value?` | `string` | The border style for the comment. |

#### Returns

`any`

If no value is set, returns the border style for the comment; otherwise, returns the comment.

___

### <a id="borderwidth" name="borderwidth"></a> borderWidth

▸ **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();
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `value?` | `number` | The border width for the comment. |

#### Returns

`any`

If no value is set, returns the border width for the comment; otherwise, returns the comment.

___

### <a id="commentstate" name="commentstate"></a> commentState

▸ **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());
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `value?` | [`CommentState`](../enums/GC.Spread.Sheets.Comments.CommentState) | The state of the comment. |

#### Returns

`any`

If no value is set, returns the state of the comment; otherwise, returns the comment.

___

### <a id="displaymode" name="displaymode"></a> displayMode

▸ **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);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `value?` | [`DisplayMode`](../enums/GC.Spread.Sheets.Comments.DisplayMode) | The display mode for the comment. |

#### Returns

`any`

If no value is set, returns the display mode for the comment; otherwise, returns the comment.

___

### <a id="dynamicmove" name="dynamicmove"></a> dynamicMove

▸ **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);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `value?` | `boolean` | Whether the comment dynamically moves. |

#### Returns

`any`

If no value is set, returns whether the comment dynamically moves; otherwise, returns the comment.

___

### <a id="dynamicsize" name="dynamicsize"></a> dynamicSize

▸ **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);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `value?` | `boolean` | Whether the comment is dynamically sized. |

#### Returns

`any`

If no value is set, returns whether the comment is dynamically sized; otherwise, returns the comment.

___

### <a id="fontfamily" name="fontfamily"></a> fontFamily

▸ **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);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `value?` | `string` | The font family for the comment. |

#### Returns

`any`

If no value is set, returns the font family for the comment; otherwise, returns the comment.

___

### <a id="fontsize" name="fontsize"></a> fontSize

▸ **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);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `value?` | `string` | The font size for the comment. |

#### Returns

`any`

If no value is set, returns the font size for the comment; otherwise, returns the comment.

___

### <a id="fontstyle" name="fontstyle"></a> fontStyle

▸ **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);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `value?` | `string` | The font style of the comment. |

#### Returns

`any`

If no value is set, returns the font style of the comment; otherwise, returns the comment.

___

### <a id="fontweight" name="fontweight"></a> fontWeight

▸ **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);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `value?` | `string` | The font weight for the comment. |

#### Returns

`any`

If no value is set, returns the font weight for the comment; otherwise, returns the comment.

___

### <a id="forecolor" name="forecolor"></a> foreColor

▸ **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);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `value?` | `string` | The text color for the comment. |

#### Returns

`any`

If no value is set, returns the text color for the comment; otherwise, returns the comment.

___

### <a id="height" name="height"></a> height

▸ **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();
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `value?` | `number` | The height of the comment. |

#### Returns

`any`

If no value is set, returns the height of the comment; otherwise, returns the comment.

___

### <a id="horizontalalign" name="horizontalalign"></a> horizontalAlign

▸ **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);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `value?` | [`HorizontalAlign`](../enums/GC.Spread.Sheets.HorizontalAlign) | The horizontal alignment of the comment. |

#### Returns

`any`

If no value is set, returns the horizontal alignment of the comment; otherwise, returns the comment.

___

### <a id="indicatorcolor" name="indicatorcolor"></a> indicatorColor

▸ **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);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `value?` | `string` | The indicatorColor for the comment. |

#### Returns

`any`

If no value is set, returns the color for the commentAdorner; otherwise, returns the comment.

___

### <a id="indicatorsize" name="indicatorsize"></a> indicatorSize

▸ **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);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `value?` | `number` | The indicatorColor for the comment. |

#### Returns

`any`

If no value is set, returns the size for the commentAdorner; otherwise, returns the comment.

___

### <a id="location" name="location"></a> location

▸ **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);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `value?` | [`Point`](GC.Spread.Sheets.Point) | The location of the comment. |

#### Returns

`any`

If no value is set, returns the location of the comment; otherwise, returns the comment.

___

### <a id="locktext" name="locktext"></a> lockText

▸ **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);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `value?` | `boolean` | The locked text for the comment. |

#### Returns

`any`

If no value is set, returns the locked text for the comment; otherwise, returns the comment.

___

### <a id="locked" name="locked"></a> locked

▸ **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);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `value?` | `boolean` | The locked setting for the comment. |

#### Returns

`any`

If no value is set, returns the locked setting for the comment; otherwise, returns the comment.

___

### <a id="opacity" name="opacity"></a> opacity

▸ **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);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `value?` | `number` | The opacity of the comment. |

#### Returns

`any`

If no value is set, returns the opacity of the comment; otherwise, returns the comment.

___

### <a id="padding" name="padding"></a> padding

▸ **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);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `value?` | [`Padding`](GC.Spread.Sheets.Comments.Padding) | The padding for the comment. |

#### Returns

`any`

If no value is set, returns the padding for the comment; otherwise, returns the comment.

___

### <a id="showshadow" name="showshadow"></a> showShadow

▸ **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();
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `value?` | `boolean` | Whether the comment displays a shadow. |

#### Returns

`any`

If no value is set, returns whether the comment displays a shadow; otherwise, returns the comment.

___

### <a id="text" name="text"></a> text

▸ **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);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `value?` | `string` | The text of the comment. |

#### Returns

`any`

If no value is set, returns the text of the comment; otherwise, returns the comment.

___

### <a id="textdecoration" name="textdecoration"></a> textDecoration

▸ **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();
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `value?` | [`TextDecorationType`](../enums/GC.Spread.Sheets.TextDecorationType) | The text decoration for the comment. |

#### Returns

`any`

If no value is set, returns the text decoration for the comment; otherwise, returns the comment.

___

### <a id="width" name="width"></a> width

▸ **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();
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `value?` | `number` | The width of the comment. |

#### Returns

`any`

If no value is set, returns the width of the comment; otherwise, returns the comment.

___

### <a id="zindex" name="zindex"></a> zIndex

▸ **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());
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `value?` | `number` | The z-index of the comment. |

#### Returns

`any`

If no value is set, returns the z-index of the comment; otherwise, returns the comment.
