# GC.Spread.Sheets.CellTypes.ButtonList

## Content

# Class: ButtonList

[Sheets](../modules/GC.Spread.Sheets).[CellTypes](../modules/GC.Spread.Sheets.CellTypes).ButtonList

## Hierarchy

- [`Base`](GC.Spread.Sheets.CellTypes.Base)

  ↳ **`ButtonList`**

## Table of contents

### Constructors

- [constructor](GC.Spread.Sheets.CellTypes.ButtonList#constructor)

### Properties

- [typeName](GC.Spread.Sheets.CellTypes.ButtonList#typename)

### Methods

- [activateEditor](GC.Spread.Sheets.CellTypes.ButtonList#activateeditor)
- [createEditorElement](GC.Spread.Sheets.CellTypes.ButtonList#createeditorelement)
- [deactivateEditor](GC.Spread.Sheets.CellTypes.ButtonList#deactivateeditor)
- [direction](GC.Spread.Sheets.CellTypes.ButtonList#direction)
- [focus](GC.Spread.Sheets.CellTypes.ButtonList#focus)
- [format](GC.Spread.Sheets.CellTypes.ButtonList#format)
- [fromJSON](GC.Spread.Sheets.CellTypes.ButtonList#fromjson)
- [getAutoFitHeight](GC.Spread.Sheets.CellTypes.ButtonList#getautofitheight)
- [getAutoFitWidth](GC.Spread.Sheets.CellTypes.ButtonList#getautofitwidth)
- [getEditorValue](GC.Spread.Sheets.CellTypes.ButtonList#geteditorvalue)
- [getHitInfo](GC.Spread.Sheets.CellTypes.ButtonList#gethitinfo)
- [isEditingValueChanged](GC.Spread.Sheets.CellTypes.ButtonList#iseditingvaluechanged)
- [isFlowLayout](GC.Spread.Sheets.CellTypes.ButtonList#isflowlayout)
- [isImeAware](GC.Spread.Sheets.CellTypes.ButtonList#isimeaware)
- [isReservedKey](GC.Spread.Sheets.CellTypes.ButtonList#isreservedkey)
- [itemSpacing](GC.Spread.Sheets.CellTypes.ButtonList#itemspacing)
- [items](GC.Spread.Sheets.CellTypes.ButtonList#items)
- [maxColumnCount](GC.Spread.Sheets.CellTypes.ButtonList#maxcolumncount)
- [maxRowCount](GC.Spread.Sheets.CellTypes.ButtonList#maxrowcount)
- [padding](GC.Spread.Sheets.CellTypes.ButtonList#padding)
- [paint](GC.Spread.Sheets.CellTypes.ButtonList#paint)
- [paintContent](GC.Spread.Sheets.CellTypes.ButtonList#paintcontent)
- [parse](GC.Spread.Sheets.CellTypes.ButtonList#parse)
- [processKeyDown](GC.Spread.Sheets.CellTypes.ButtonList#processkeydown)
- [processKeyUp](GC.Spread.Sheets.CellTypes.ButtonList#processkeyup)
- [processMouseDown](GC.Spread.Sheets.CellTypes.ButtonList#processmousedown)
- [processMouseEnter](GC.Spread.Sheets.CellTypes.ButtonList#processmouseenter)
- [processMouseLeave](GC.Spread.Sheets.CellTypes.ButtonList#processmouseleave)
- [processMouseMove](GC.Spread.Sheets.CellTypes.ButtonList#processmousemove)
- [processMouseUp](GC.Spread.Sheets.CellTypes.ButtonList#processmouseup)
- [selectAll](GC.Spread.Sheets.CellTypes.ButtonList#selectall)
- [selectedBackColor](GC.Spread.Sheets.CellTypes.ButtonList#selectedbackcolor)
- [selectedForeColor](GC.Spread.Sheets.CellTypes.ButtonList#selectedforecolor)
- [selectionMode](GC.Spread.Sheets.CellTypes.ButtonList#selectionmode)
- [setEditorValue](GC.Spread.Sheets.CellTypes.ButtonList#seteditorvalue)
- [toJSON](GC.Spread.Sheets.CellTypes.ButtonList#tojson)
- [updateEditor](GC.Spread.Sheets.CellTypes.ButtonList#updateeditor)
- [updateEditorContainer](GC.Spread.Sheets.CellTypes.ButtonList#updateeditorcontainer)
- [updateImeMode](GC.Spread.Sheets.CellTypes.ButtonList#updateimemode)

## Constructors

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

• **new ButtonList**()

Represents an editable buttonList cell.

**`example`**
```javascript
//This example creates a buttonList cell.
var cellType2 = new GC.Spread.Sheets.CellTypes.ButtonList();
cellType2.items([{text:"a",value:1},{text:"b",value:2},{text:"c",value:3}]);
activeSheet.getCell(2, 2).cellType(cellType2);
```

#### Overrides

[Base](GC.Spread.Sheets.CellTypes.Base).[constructor](GC.Spread.Sheets.CellTypes.Base#constructor)

## Properties

### <a id="typename" name="typename"></a> typeName

• **typeName**: `string`

Represents the type name string used for supporting serialization.

#### Inherited from

[Base](GC.Spread.Sheets.CellTypes.Base).[typeName](GC.Spread.Sheets.CellTypes.Base#typename)

## Methods

### <a id="activateeditor" name="activateeditor"></a> activateEditor

▸ **activateEditor**(`editorContext`, `cellStyle`, `cellRect`, `context?`): `void`

Activates the editor, including setting properties or attributes for the editor and binding events for the editor.

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `editorContext` | `HTMLElement` | The DOM element that was created by the createEditorElement method. |
| `cellStyle` | [`Style`](GC.Spread.Sheets.Style) | The cell's actual style. |
| `cellRect` | [`Rect`](GC.Spread.Sheets.Rect) | The cell's layout information. |
| `context?` | `any` | The context associated with the cell type. See the Remarks for more information. |

#### Returns

`void`

#### Inherited from

[Base](GC.Spread.Sheets.CellTypes.Base).[activateEditor](GC.Spread.Sheets.CellTypes.Base#activateeditor)

___

### <a id="createeditorelement" name="createeditorelement"></a> createEditorElement

▸ **createEditorElement**(`context?`): `HTMLElement`

Creates a DOM element then returns it.

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `context?` | `any` | The context associated with the cell type. See the Remarks for more information. |

#### Returns

`HTMLElement`

Returns a DOM element.

#### Inherited from

[Base](GC.Spread.Sheets.CellTypes.Base).[createEditorElement](GC.Spread.Sheets.CellTypes.Base#createeditorelement)

___

### <a id="deactivateeditor" name="deactivateeditor"></a> deactivateEditor

▸ **deactivateEditor**(`editorContext`, `context?`): `void`

Deactivates the editor, such as unbinding events for editor.

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `editorContext` | `HTMLElement` | The DOM element that was created by the createEditorElement method. |
| `context?` | `any` | The context associated with the cell type. See the Remarks for more information. |

#### Returns

`void`

#### Inherited from

[Base](GC.Spread.Sheets.CellTypes.Base).[deactivateEditor](GC.Spread.Sheets.CellTypes.Base#deactivateeditor)

___

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

▸ **direction**(`value?`): `any`

Gets or sets the buttonList list's orders.

**`example`**
```javascript
//This example creates a buttonList list cell.
var cellType2 = new GC.Spread.Sheets.CellTypes.ButtonList();
cellType2.items([{text:"a",value:1},{text:"b",value:2},{text:"c",value:3}]);
cellType2.direction(GC.Spread.Sheets.CellTypes.Direction.vertical);
activeSheet.getCell(2, 2).cellType(cellType2);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `value?` | [`Direction`](../enums/GC.Spread.Sheets.CellTypes.Direction) | Whether the order is vertical. |

#### Returns

`any`

If no value is set, returns whether the buttonList list's orders is vertical; otherwise, returns the checkbox list cellType.

___

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

▸ **focus**(`editorContext`, `context?`): `void`

Focuses the editor DOM element.

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `editorContext` | `HTMLElement` | The DOM element that was created by the createEditorElement method. |
| `context?` | `any` | The context associated with the cell type. See the Remarks for more information. |

#### Returns

`void`

#### Inherited from

[Base](GC.Spread.Sheets.CellTypes.Base).[focus](GC.Spread.Sheets.CellTypes.Base#focus)

___

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

▸ **format**(`value`, `format`, `formattedData?`, `context?`): `string`

Formats a value with the specified format to a string.

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `value` | `any` | The object value to format. |
| `format` | `string` \| [`GeneralFormatter`](GC.Spread.Formatter.GeneralFormatter) | The format. |
| `formattedData?` | [`FormattedData`](../interfaces/GC.Spread.Sheets.FormattedData) | the formatted data. |
| `context?` | `any` | The context associated with the cell type. See the Remarks for more information. |

#### Returns

`string`

Returns the formatted string.

#### Inherited from

[Base](GC.Spread.Sheets.CellTypes.Base).[format](GC.Spread.Sheets.CellTypes.Base#format)

___

### <a id="fromjson" name="fromjson"></a> fromJSON

▸ **fromJSON**(`settings`): `void`

Loads the object state from the specified JSON string.

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `settings` | `any` | The cell type data from deserialization. |

#### Returns

`void`

#### Inherited from

[Base](GC.Spread.Sheets.CellTypes.Base).[fromJSON](GC.Spread.Sheets.CellTypes.Base#fromjson)

___

### <a id="getautofitheight" name="getautofitheight"></a> getAutoFitHeight

▸ **getAutoFitHeight**(`value`, `text`, `cellStyle`, `zoomFactor`, `context?`): `number`

Gets a cell's height that can be used to handle the row's automatic fit.

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `value` | `any` | The cell's value. |
| `text` | `string` | The cell's text. |
| `cellStyle` | [`Style`](GC.Spread.Sheets.Style) | The cell's actual value. |
| `zoomFactor` | `number` | The current sheet's zoom factor. |
| `context?` | `any` | The context associated with the cell type. See the Remarks for more information. |

#### Returns

`number`

Returns the cell's height that can be used to handle the row's automatic fit.

#### Inherited from

[Base](GC.Spread.Sheets.CellTypes.Base).[getAutoFitHeight](GC.Spread.Sheets.CellTypes.Base#getautofitheight)

___

### <a id="getautofitwidth" name="getautofitwidth"></a> getAutoFitWidth

▸ **getAutoFitWidth**(`value`, `text`, `cellStyle`, `zoomFactor`, `context?`): `number`

Gets a cell's width that can be used to handle the column's automatic fit.

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `value` | `any` | The cell's value. |
| `text` | `string` | The cell's text. |
| `cellStyle` | [`Style`](GC.Spread.Sheets.Style) | The cell's actual value. |
| `zoomFactor` | `number` | The current sheet's zoom factor. |
| `context?` | `any` | The context associated with the cell type. See the Remarks for more information. |

#### Returns

`number`

Returns the cell's width that can be used to handle the column's automatic fit.

#### Inherited from

[Base](GC.Spread.Sheets.CellTypes.Base).[getAutoFitWidth](GC.Spread.Sheets.CellTypes.Base#getautofitwidth)

___

### <a id="geteditorvalue" name="geteditorvalue"></a> getEditorValue

▸ **getEditorValue**(`editorContext`, `context?`): `any`

Gets the editor's value.

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `editorContext` | `HTMLElement` | The DOM element that was created by the createEditorElement method. |
| `context?` | `any` | The context associated with the cell type. See the Remarks for more information. |

#### Returns

`any`

Returns the editor's value.

#### Inherited from

[Base](GC.Spread.Sheets.CellTypes.Base).[getEditorValue](GC.Spread.Sheets.CellTypes.Base#geteditorvalue)

___

### <a id="gethitinfo" name="gethitinfo"></a> getHitInfo

▸ **getHitInfo**(`x`, `y`, `cellStyle`, `cellRect`, `context?`): [`IHitTestCellTypeHitInfo`](../interfaces/GC.Spread.Sheets.IHitTestCellTypeHitInfo)

Gets the cell type's hit information.

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `x` | `number` | <i>x</i>-coordinate of pointer's current location relative to the canvas. |
| `y` | `number` | <i>y</i>-coordinate of pointer's current location relative to the canvas. |
| `cellStyle` | [`Style`](GC.Spread.Sheets.Style) | The current cell's actual style. |
| `cellRect` | [`Rect`](GC.Spread.Sheets.Rect) | The current cell's layout information. |
| `context?` | `any` | The context associated with the cell type. See the Remarks for more information. |

#### Returns

[`IHitTestCellTypeHitInfo`](../interfaces/GC.Spread.Sheets.IHitTestCellTypeHitInfo)

Returns an object that contains the <i>x</i>, <i>y</i>, <i>row</i>, <i>col</i>, <i>cellRect</i>, and <i>sheetArea</i> parameters, and a value to indicate <i>isReservedLocation</i>.
<i>isReservedLocation</i> is `true` if the hit test is in a special area that the cell type needs to handle; otherwise, `false`.

#### Inherited from

[Base](GC.Spread.Sheets.CellTypes.Base).[getHitInfo](GC.Spread.Sheets.CellTypes.Base#gethitinfo)

___

### <a id="iseditingvaluechanged" name="iseditingvaluechanged"></a> isEditingValueChanged

▸ **isEditingValueChanged**(`oldValue`, `newValue`, `context?`): `boolean`

Whether the editing value has changed.

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `oldValue` | `any` | Old editing value. |
| `newValue` | `any` | New editing value. |
| `context?` | `any` | The context associated with the cell type. See the Remarks for more information. |

#### Returns

`boolean`

`true` if oldValue equals newValue; otherwise, `false`.

#### Inherited from

[Base](GC.Spread.Sheets.CellTypes.Base).[isEditingValueChanged](GC.Spread.Sheets.CellTypes.Base#iseditingvaluechanged)

___

### <a id="isflowlayout" name="isflowlayout"></a> isFlowLayout

▸ **isFlowLayout**(`value?`): `any`

Gets or sets the buttonList list's layout is autofit.

**`example`**
```javascript
//This example creates a buttonList list cell.
var cellType2 = new GC.Spread.Sheets.CellTypes.ButtonList();
cellType2.items([{text:"a",value:1},{text:"b",value:2},{text:"c",value:3}]);
cellType2.isFlowLayout(true);
activeSheet.getCell(2, 2).cellType(cellType2);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `value?` | `boolean` | Whether the layout is autofit. |

#### Returns

`any`

If no value is set, returns whether the layout is autofit, returns the buttonList list cellType.

___

### <a id="isimeaware" name="isimeaware"></a> isImeAware

▸ **isImeAware**(`context?`): `boolean`

Whether this cell type is aware of IME.

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `context?` | `any` | The context associated with the cell type. See the Remarks for more information. |

#### Returns

`boolean`

`true` if the cell type is aware of IME; otherwise, `false`.

#### Inherited from

[Base](GC.Spread.Sheets.CellTypes.Base).[isImeAware](GC.Spread.Sheets.CellTypes.Base#isimeaware)

___

### <a id="isreservedkey" name="isreservedkey"></a> isReservedKey

▸ **isReservedKey**(`e`, `context?`): `boolean`

Whether the cell type handles the keyboard event itself.

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `e` | `KeyboardEvent` | The KeyboardEvent. |
| `context?` | `any` | The context associated with the cell type. See the Remarks for more information. |

#### Returns

`boolean`

Returns `true` if the cell type handles the keyboard event itself; otherwise, `false`.

#### Inherited from

[Base](GC.Spread.Sheets.CellTypes.Base).[isReservedKey](GC.Spread.Sheets.CellTypes.Base#isreservedkey)

___

### <a id="itemspacing" name="itemspacing"></a> itemSpacing

▸ **itemSpacing**(`value?`): `any`

Gets or sets the space for two items in the buttonList.

**`example`**
```javascript
//This example creates a buttonList cell.
var cellType2 = new GC.Spread.Sheets.CellTypes.ButtonList();
cellType2.items([{text:"a",value:1},{text:"b",value:2},{text:"c",value:3}]);
cellType2.itemSpacing({
     horizontal:80,
     vertical:20
});
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `value?` | [`IItemSpacing`](../interfaces/GC.Spread.Sheets.CellTypes.IItemSpacing) | the space for two items in the buttonList. |

#### Returns

`any`

If no value is set, returns the space for two items in the buttonList; otherwise, returns the buttonList cellType.

___

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

▸ **items**(`items?`): `any`

Gets or sets the items for the buttonList list.

**`example`**
```javascript
//This example creates a buttonList list cell.
var cellType2 = new GC.Spread.Sheets.CellTypes.ButtonList();
cellType2.items([{text:"a",value:1},{text:"b",value:2},{text:"c",value:3}]);
activeSheet.getCell(2, 2).cellType(cellType2);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `items?` | `string`[] \| [`ICelltypeItemOption`](../interfaces/GC.Spread.Sheets.CellTypes.ICelltypeItemOption)[] | The items for the buttonList list. |

#### Returns

`any`

If no value is set, returns the items array; otherwise, returns the buttonList list cellType.

___

### <a id="maxcolumncount" name="maxcolumncount"></a> maxColumnCount

▸ **maxColumnCount**(`value?`): `any`

Gets or sets the items for the buttonList list's column count.

**`example`**
```javascript
//This example creates a buttonList list cell.
var cellType2 = new GC.Spread.Sheets.CellTypes.ButtonList();
cellType2.items([{text:"a",value:1},{text:"b",value:2},{text:"c",value:3}]);
cellType2.maxColumnCount(2);
activeSheet.getCell(2, 2).cellType(cellType2);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `value?` | `number` | The column count for the buttonList list. |

#### Returns

`any`

If no value is set, returns the column count; otherwise, returns the buttonList list cellType.

___

### <a id="maxrowcount" name="maxrowcount"></a> maxRowCount

▸ **maxRowCount**(`value?`): `any`

Gets or sets the items for the buttonList list's row count.

**`example`**
```javascript
//This example creates buttonList list cell.
var cellType2 = new GC.Spread.Sheets.CellTypes.ButtonList();
cellType2.items([{text:"a",value:1},{text:"b",value:2},{text:"c",value:3}]);
cellType2.maxRowCount(2);
activeSheet.getCell(2, 2).cellType(cellType2);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `value?` | `number` | The row count for the buttonList list. |

#### Returns

`any`

If no value is set, returns the row count; otherwise, returns the buttonList list cellType.

___

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

▸ **padding**(`value?`): `any`

Gets or sets the buttonList's padding in pixels relative to the cell.

**`example`**
```javascript
//This example creates a buttonList cell and sets its padding.
var cellType = new GC.Spread.Sheets.CellTypes.ButtonList();
cellType.padding("5");
activeSheet.getCell(0, 2).cellType(cellType);
activeSheet.setColumnWidth(2, 120.0,GC.Spread.Sheets.SheetArea.viewport);
activeSheet.setRowHeight(0, 90.0,GC.Spread.Sheets.SheetArea.viewport);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `value?` | `string` | The buttonList's padding relative to the cell. |

#### Returns

`any`

If no value is set, returns the padding in pixels; otherwise, returns the buttonList cell type.

___

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

▸ **paint**(`ctx`, `value`, `x`, `y`, `w`, `h`, `style`, `context?`): `void`

Paints a cell on the canvas.

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `ctx` | `CanvasRenderingContext2D` | The canvas's two-dimensional context. |
| `value` | `any` | The cell's value. |
| `x` | `number` | <i>x</i>-coordinate relative to the canvas. |
| `y` | `number` | <i>y</i>-coordinate relative to the canvas. |
| `w` | `number` | The cell's width. |
| `h` | `number` | The cell's height. |
| `style` | [`Style`](GC.Spread.Sheets.Style) | The cell's actual style. |
| `context?` | `any` | The context associated with the cell type. See the Remarks for more information. |

#### Returns

`void`

#### Inherited from

[Base](GC.Spread.Sheets.CellTypes.Base).[paint](GC.Spread.Sheets.CellTypes.Base#paint)

___

### <a id="paintcontent" name="paintcontent"></a> paintContent

▸ **paintContent**(`ctx`, `value`, `x`, `y`, `w`, `h`, `style`, `context?`): `void`

Paints the cell content area on the canvas.

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `ctx` | `CanvasRenderingContext2D` | The canvas's two-dimensional context. |
| `value` | `any` | The cell's value. |
| `x` | `number` | <i>x</i>-coordinate relative to the canvas. |
| `y` | `number` | <i>y</i>-coordinate relative to the canvas. |
| `w` | `number` | The cell content area's width. |
| `h` | `number` | The cell content area's height. |
| `style` | [`Style`](GC.Spread.Sheets.Style) | The cell's actual style. |
| `context?` | `any` | The context associated with the cell type. See the Remarks for more information. |

#### Returns

`void`

#### Inherited from

[Base](GC.Spread.Sheets.CellTypes.Base).[paintContent](GC.Spread.Sheets.CellTypes.Base#paintcontent)

___

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

▸ **parse**(`text`, `formatStr`, `context?`): `any`

Parses the text with the specified format string to an object.

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `text` | `string` | The parse text string. |
| `formatStr` | `string` | The parse format string. |
| `context?` | `any` | The context associated with the cell type. See the Remarks for more information. |

#### Returns

`any`

The parsed object.

#### Inherited from

[Base](GC.Spread.Sheets.CellTypes.Base).[parse](GC.Spread.Sheets.CellTypes.Base#parse)

___

### <a id="processkeydown" name="processkeydown"></a> processKeyDown

▸ **processKeyDown**(`event`, `context?`): `boolean`

Processes key down in display mode.

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `event` | `KeyboardEvent` | The KeyboardEvent. |
| `context?` | `any` | The context associated with the cell type. See the Remarks for more information. |

#### Returns

`boolean`

Returns `true` if the process is successful; otherwise, `false`.

#### Inherited from

[Base](GC.Spread.Sheets.CellTypes.Base).[processKeyDown](GC.Spread.Sheets.CellTypes.Base#processkeydown)

___

### <a id="processkeyup" name="processkeyup"></a> processKeyUp

▸ **processKeyUp**(`event`, `context?`): `boolean`

Processes key up in display mode.

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `event` | `KeyboardEvent` | The KeyboardEvent. |
| `context?` | `any` | The context associated with the cell type. See the Remarks for more information. |

#### Returns

`boolean`

Returns `true` if the process is successful; otherwise, `false`.

#### Inherited from

[Base](GC.Spread.Sheets.CellTypes.Base).[processKeyUp](GC.Spread.Sheets.CellTypes.Base#processkeyup)

___

### <a id="processmousedown" name="processmousedown"></a> processMouseDown

▸ **processMouseDown**(`hitInfo`): `boolean`

Processes mouse down in display mode.

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `hitInfo` | [`IHitTestCellTypeHitInfo`](../interfaces/GC.Spread.Sheets.IHitTestCellTypeHitInfo) | The hit test information returned by the getHitInfo method. See the Remarks for more information. |

#### Returns

`boolean`

Returns `true` if the process is successful; otherwise, `false`.

#### Inherited from

[Base](GC.Spread.Sheets.CellTypes.Base).[processMouseDown](GC.Spread.Sheets.CellTypes.Base#processmousedown)

___

### <a id="processmouseenter" name="processmouseenter"></a> processMouseEnter

▸ **processMouseEnter**(`hitInfo`): `boolean`

Processes mouse enter in display mode.

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `hitInfo` | [`IHitTestCellTypeHitInfo`](../interfaces/GC.Spread.Sheets.IHitTestCellTypeHitInfo) | The hit test information returned by the getHitInfo method. See the Remarks for more information. |

#### Returns

`boolean`

Returns `true` if the process is successful; otherwise, `false`.

#### Inherited from

[Base](GC.Spread.Sheets.CellTypes.Base).[processMouseEnter](GC.Spread.Sheets.CellTypes.Base#processmouseenter)

___

### <a id="processmouseleave" name="processmouseleave"></a> processMouseLeave

▸ **processMouseLeave**(`hitInfo`): `boolean`

Processes mouse leave in display mode.

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `hitInfo` | [`IHitTestCellTypeHitInfo`](../interfaces/GC.Spread.Sheets.IHitTestCellTypeHitInfo) | The hit test information returned by the getHitInfo method. See the Remarks for more information. |

#### Returns

`boolean`

Returns `true` if the process is successful; otherwise, `false`.

#### Inherited from

[Base](GC.Spread.Sheets.CellTypes.Base).[processMouseLeave](GC.Spread.Sheets.CellTypes.Base#processmouseleave)

___

### <a id="processmousemove" name="processmousemove"></a> processMouseMove

▸ **processMouseMove**(`hitInfo`): `boolean`

Processes mouse move in display mode.

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `hitInfo` | [`IHitTestCellTypeHitInfo`](../interfaces/GC.Spread.Sheets.IHitTestCellTypeHitInfo) | The hit test information returned by the getHitInfo method. See the Remarks for more information. |

#### Returns

`boolean`

Returns `true` if the process is successful; otherwise, `false`.

#### Inherited from

[Base](GC.Spread.Sheets.CellTypes.Base).[processMouseMove](GC.Spread.Sheets.CellTypes.Base#processmousemove)

___

### <a id="processmouseup" name="processmouseup"></a> processMouseUp

▸ **processMouseUp**(`hitInfo`): `boolean`

Processes mouse up in display mode.

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `hitInfo` | [`IHitTestCellTypeHitInfo`](../interfaces/GC.Spread.Sheets.IHitTestCellTypeHitInfo) | The hit test information returned by the getHitInfo method. See the Remarks for more information. |

#### Returns

`boolean`

Returns `true` if the process is successful; otherwise, `false`.

#### Inherited from

[Base](GC.Spread.Sheets.CellTypes.Base).[processMouseUp](GC.Spread.Sheets.CellTypes.Base#processmouseup)

___

### <a id="selectall" name="selectall"></a> selectAll

▸ **selectAll**(`editorContext`, `context?`): `void`

Selects all the text in the editor DOM element.

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `editorContext` | `HTMLElement` | The DOM element that was created by the createEditorElement method. |
| `context?` | `any` | The context associated with the cell type. See the Remarks for more information. |

#### Returns

`void`

#### Inherited from

[Base](GC.Spread.Sheets.CellTypes.Base).[selectAll](GC.Spread.Sheets.CellTypes.Base#selectall)

___

### <a id="selectedbackcolor" name="selectedbackcolor"></a> selectedBackColor

▸ **selectedBackColor**(`value?`): `any`

Gets or sets the selected buttonList's background color.

**`example`**
```javascript
//This example creates a buttonList cell.
var cellType = new GC.Spread.Sheets.CellTypes.ButtonList();
cellType.selectedBackColor("#FFFF00");
activeSheet.getCell(0, 2).cellType(cellType);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `value?` | `string` | The selected buttonList's background color. |

#### Returns

`any`

If no value is set, returns the background color; otherwise, returns the buttonList cell type.

___

### <a id="selectedforecolor" name="selectedforecolor"></a> selectedForeColor

▸ **selectedForeColor**(`value?`): `any`

Gets or sets the selected buttonList's fore color.

**`example`**
```javascript
//This example creates a buttonList cell.
var cellType = new GC.Spread.Sheets.CellTypes.ButtonList();
cellType.selectedForeColor("#FFFF00");
activeSheet.getCell(0, 2).cellType(cellType);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `value?` | `string` | The selected buttonList's fore color. |

#### Returns

`any`

If no value is set, returns the fore color; otherwise, returns the buttonList cell type.

___

### <a id="selectionmode" name="selectionmode"></a> selectionMode

▸ **selectionMode**(`value?`): `any`

Gets or sets the buttonList's select mode.

**`example`**
```javascript
//This example creates a buttonList cell.
var cellType = new GC.Spread.Sheets.CellTypes.ButtonList();
cellType.selectionMode(GC.Spread.Sheets.CellTypes.SelectionMode.single);
activeSheet.getCell(0, 2).cellType(cellType);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `value?` | [`SelectionMode`](../enums/GC.Spread.Sheets.CellTypes.SelectionMode) | The selected buttonList's select mode. |

#### Returns

`any`

If no value is set, returns the select mode; otherwise, returns the buttonList cell type.

___

### <a id="seteditorvalue" name="seteditorvalue"></a> setEditorValue

▸ **setEditorValue**(`editorContext`, `value`, `context?`): `void`

Sets the editor's value.

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `editorContext` | `HTMLElement` | The DOM element that was created by the createEditorElement method. |
| `value` | `any` | The value returned from the active cell. |
| `context?` | `any` | The context associated with the cell type. See the Remarks for more information. |

#### Returns

`void`

#### Inherited from

[Base](GC.Spread.Sheets.CellTypes.Base).[setEditorValue](GC.Spread.Sheets.CellTypes.Base#seteditorvalue)

___

### <a id="tojson" name="tojson"></a> toJSON

▸ **toJSON**(): `any`

Saves the object state to a JSON string.

#### Returns

`any`

The cell type data.

#### Inherited from

[Base](GC.Spread.Sheets.CellTypes.Base).[toJSON](GC.Spread.Sheets.CellTypes.Base#tojson)

___

### <a id="updateeditor" name="updateeditor"></a> updateEditor

▸ **updateEditor**(`editorContext`, `cellStyle`, `cellRect`, `context?`): [`Rect`](GC.Spread.Sheets.Rect)

Updates the editor's size.

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `editorContext` | `HTMLElement` | The DOM element that was created by the createEditorElement method. |
| `cellStyle` | [`Style`](GC.Spread.Sheets.Style) | The cell's actual style. |
| `cellRect` | [`Rect`](GC.Spread.Sheets.Rect) | The cell's layout information. |
| `context?` | `any` | The context associated with the cell type. See the Remarks for more information. |

#### Returns

[`Rect`](GC.Spread.Sheets.Rect)

Returns the new size for cell wrapper element, it should contain two properties 'width' and 'height'.

#### Inherited from

[Base](GC.Spread.Sheets.CellTypes.Base).[updateEditor](GC.Spread.Sheets.CellTypes.Base#updateeditor)

___

### <a id="updateeditorcontainer" name="updateeditorcontainer"></a> updateEditorContainer

▸ **updateEditorContainer**(`editorContext`, `editorBounds`, `cellStyle`): `void`

Updates the cell wrapper element size.

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `editorContext` | `HTMLElement` | The DOM element that was created by the createEditorElement method. |
| `editorBounds` | [`Rect`](GC.Spread.Sheets.Rect) | The cell wrapper element's new size. |
| `cellStyle` | [`Style`](GC.Spread.Sheets.Style) | The cell's actual style. |

#### Returns

`void`

#### Inherited from

[Base](GC.Spread.Sheets.CellTypes.Base).[updateEditorContainer](GC.Spread.Sheets.CellTypes.Base#updateeditorcontainer)

___

### <a id="updateimemode" name="updateimemode"></a> updateImeMode

▸ **updateImeMode**(`editorContext`, `imeMode`, `context?`): `void`

Updates the editor's ime-mode.

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `editorContext` | `HTMLElement` | The DOM element that was created by the createEditorElement method. |
| `imeMode` | [`ImeMode`](../enums/GC.Spread.Sheets.ImeMode) | The ime-mode from cell's actual style. |
| `context?` | `any` | The context associated with the cell type. See the Remarks for more information. |

#### Returns

`void`

#### Inherited from

[Base](GC.Spread.Sheets.CellTypes.Base).[updateImeMode](GC.Spread.Sheets.CellTypes.Base#updateimemode)
