# GC.Spread.Sheets.ThreadedComments.ThreadedCommentPanel

## Content

# Class: ThreadedCommentPanel

[Sheets](../modules/GC.Spread.Sheets).[ThreadedComments](../modules/GC.Spread.Sheets.ThreadedComments).ThreadedCommentPanel

## Table of contents

### Constructors

- [constructor](GC.Spread.Sheets.ThreadedComments.ThreadedCommentPanel#constructor)

### Methods

- [attach](GC.Spread.Sheets.ThreadedComments.ThreadedCommentPanel#attach)
- [destroy](GC.Spread.Sheets.ThreadedComments.ThreadedCommentPanel#destroy)
- [detach](GC.Spread.Sheets.ThreadedComments.ThreadedCommentPanel#detach)
- [findControl](GC.Spread.Sheets.ThreadedComments.ThreadedCommentPanel#findcontrol)
- [refresh](GC.Spread.Sheets.ThreadedComments.ThreadedCommentPanel#refresh)

## Constructors

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

• **new ThreadedCommentPanel**(`host`, `workbook`)

Represents the threaded comment panel for managing and navigating threaded comments in a workbook.

**`example`**
```javascript
const spread = new GC.Spread.Sheets.Workbook(document.getElementById("ss"));
const panelHost = document.getElementById("threadedCommentPanel");
const threadedCommentPanel = new GC.Spread.Sheets.ThreadedComments.ThreadedCommentPanel(panelHost, spread);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `host` | `string` \| `HTMLElement` | Indicates the container element or the ID of the container element where the panel will be rendered. |
| `workbook` | [`Workbook`](GC.Spread.Sheets.Workbook) | Indicates the workbook instance to which the threaded comment panel is attached. |

## Methods

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

▸ **attach**(`workbook`): `any`

**`description`** attach to a workbook for threaded comment panel.

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `workbook` | [`Workbook`](GC.Spread.Sheets.Workbook) | Indicates the workbook which is attached. |

#### Returns

`any`

void

___

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

▸ **destroy**(): `any`

**`description`** destroy the PivotPanel.

#### Returns

`any`

___

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

▸ **detach**(): `void`

**`description`** detach the workbook for threaded comment panel.

#### Returns

`void`

void

___

### <a id="findcontrol" name="findcontrol"></a> findControl

▸ **findControl**(`host`): [`ThreadedCommentPanel`](GC.Spread.Sheets.ThreadedComments.ThreadedCommentPanel)

Gets the ThreadedCommentPanel instance by the host element.

**`example`**
```javascript
window.onload = function(){
     var spread = new GC.Spread.Sheets.Workbook(document.getElementById("ss"));
     var threadedCommentPanel = new GC.Spread.Sheets.ThreadedComments.ThreadedCommentPanel(document.getElementById("threadedCommentPanel"));
     threadedCommentPanel.workbook(spread);
     var threadedCommentPanelInstance = GC.Spread.Sheets.ThreadedComments.ThreadedCommentPanel.findControl("threadedCommentPanel");
}
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `host` | `string` \| `HTMLElement` | The host element or the host element id. |

#### Returns

[`ThreadedCommentPanel`](GC.Spread.Sheets.ThreadedComments.ThreadedCommentPanel)

The ThreadedCommentPanel instance.

___

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

▸ **refresh**(): `void`

refresh the threaded comment panel.

#### Returns

`void`
