# GC.Spread.Sheets.Shapes.FormControlShape

## Content

# Class: FormControlShape

[Sheets](../modules/GC.Spread.Sheets).[Shapes](../modules/GC.Spread.Sheets.Shapes).FormControlShape

## Hierarchy

- [`Shape`](GC.Spread.Sheets.Shapes.Shape)

  ↳ **`FormControlShape`**

## Table of contents

### Constructors

- [constructor](GC.Spread.Sheets.Shapes.FormControlShape#constructor)

### Methods

- [adjustments](GC.Spread.Sheets.Shapes.FormControlShape#adjustments)
- [allowMove](GC.Spread.Sheets.Shapes.FormControlShape#allowmove)
- [allowResize](GC.Spread.Sheets.Shapes.FormControlShape#allowresize)
- [allowRotate](GC.Spread.Sheets.Shapes.FormControlShape#allowrotate)
- [alt](GC.Spread.Sheets.Shapes.FormControlShape#alt)
- [canPrint](GC.Spread.Sheets.Shapes.FormControlShape#canprint)
- [dynamicMove](GC.Spread.Sheets.Shapes.FormControlShape#dynamicmove)
- [dynamicSize](GC.Spread.Sheets.Shapes.FormControlShape#dynamicsize)
- [enabled](GC.Spread.Sheets.Shapes.FormControlShape#enabled)
- [endColumn](GC.Spread.Sheets.Shapes.FormControlShape#endcolumn)
- [endColumnOffset](GC.Spread.Sheets.Shapes.FormControlShape#endcolumnoffset)
- [endRow](GC.Spread.Sheets.Shapes.FormControlShape#endrow)
- [endRowOffset](GC.Spread.Sheets.Shapes.FormControlShape#endrowoffset)
- [formControlType](GC.Spread.Sheets.Shapes.FormControlShape#formcontroltype)
- [getFormula](GC.Spread.Sheets.Shapes.FormControlShape#getformula)
- [height](GC.Spread.Sheets.Shapes.FormControlShape#height)
- [hyperlink](GC.Spread.Sheets.Shapes.FormControlShape#hyperlink)
- [isLocked](GC.Spread.Sheets.Shapes.FormControlShape#islocked)
- [isSelected](GC.Spread.Sheets.Shapes.FormControlShape#isselected)
- [isTextBox](GC.Spread.Sheets.Shapes.FormControlShape#istextbox)
- [isVisible](GC.Spread.Sheets.Shapes.FormControlShape#isvisible)
- [name](GC.Spread.Sheets.Shapes.FormControlShape#name)
- [options](GC.Spread.Sheets.Shapes.FormControlShape#options)
- [rotate](GC.Spread.Sheets.Shapes.FormControlShape#rotate)
- [setFormula](GC.Spread.Sheets.Shapes.FormControlShape#setformula)
- [showHandle](GC.Spread.Sheets.Shapes.FormControlShape#showhandle)
- [startColumn](GC.Spread.Sheets.Shapes.FormControlShape#startcolumn)
- [startColumnOffset](GC.Spread.Sheets.Shapes.FormControlShape#startcolumnoffset)
- [startRow](GC.Spread.Sheets.Shapes.FormControlShape#startrow)
- [startRowOffset](GC.Spread.Sheets.Shapes.FormControlShape#startrowoffset)
- [style](GC.Spread.Sheets.Shapes.FormControlShape#style)
- [text](GC.Spread.Sheets.Shapes.FormControlShape#text)
- [toImageSrc](GC.Spread.Sheets.Shapes.FormControlShape#toimagesrc)
- [type](GC.Spread.Sheets.Shapes.FormControlShape#type)
- [value](GC.Spread.Sheets.Shapes.FormControlShape#value)
- [width](GC.Spread.Sheets.Shapes.FormControlShape#width)
- [x](GC.Spread.Sheets.Shapes.FormControlShape#x)
- [y](GC.Spread.Sheets.Shapes.FormControlShape#y)

## Constructors

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

• **new FormControlShape**(`worksheet`, `formControlType`, `left?`, `top?`, `width?`, `height?`)

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `worksheet` | [`Worksheet`](GC.Spread.Sheets.Worksheet) | The host worksheet of the shape. |
| `formControlType` | [`FormControlType`](../enums/GC.Spread.Sheets.Shapes.FormControlType) | - |
| `left?` | `number` | - |
| `top?` | `number` | - |
| `width?` | `number` | - |
| `height?` | `number` | - |

#### Overrides

[Shape](GC.Spread.Sheets.Shapes.Shape).[constructor](GC.Spread.Sheets.Shapes.Shape#constructor)

## Methods

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

▸ **adjustments**(`arrayValue?`): `void` \| `number`[]

Gets or sets the adjustment values of the shape.

**`example`**
```
var blockArc = sheet.shapes.add("", GC.Spread.Sheets.Shapes.AutoShapeType.blockArc, 100, 60, 200, 160);
var adjustments = blockArc.adjustments();
console.log(adjustments);
adjustments[0] = 150;
adjustments[1] = 15;
adjustments[2] = 0.35;
blockArc.adjustments(adjustments);
blockArc.isSelected(true);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `arrayValue?` | `number`[] | The adjustment values in array. |

#### Returns

`void` \| `number`[]

if no value is set, returns the current adjustment values of the shape.

#### Inherited from

[Shape](GC.Spread.Sheets.Shapes.Shape).[adjustments](GC.Spread.Sheets.Shapes.Shape#adjustments)

___

### <a id="allowmove" name="allowmove"></a> allowMove

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

Gets or sets whether to disable moving the shape.

**`example`**
```
var heart = sheet.shapes.add("Shape1", GC.Spread.Sheets.Shapes.AutoShapeType.heart, 100, 60, 200, 160);
var state = heart.allowMove();
heart.allowMove(!state);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `value?` | `boolean` | The setting for whether to disable moving the shape. |

#### Returns

`any`

If no value is set, returns the setting for whether to disable moving the shape.

#### Inherited from

[Shape](GC.Spread.Sheets.Shapes.Shape).[allowMove](GC.Spread.Sheets.Shapes.Shape#allowmove)

___

### <a id="allowresize" name="allowresize"></a> allowResize

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

Gets or sets the resize mode of the shape.

**`example`**
```
var heart = sheet.shapes.add("Shape1", GC.Spread.Sheets.Shapes.AutoShapeType.heart, 100, 60, 200, 160);
var state = heart.allowResize();
heart.allowResize(GC.Spread.Sheets.Shapes.ResizeMode.aspect);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `value?` | `boolean` \| [`ResizeMode`](../enums/GC.Spread.Sheets.Shapes.ResizeMode) | The setting for whether to disable resizing the shape. |

#### Returns

`any`

If no value is set, returns the setting for whether to disable resizing the shape.

#### Inherited from

[Shape](GC.Spread.Sheets.Shapes.Shape).[allowResize](GC.Spread.Sheets.Shapes.Shape#allowresize)

___

### <a id="allowrotate" name="allowrotate"></a> allowRotate

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

Gets or sets whether to disable rotating the shape.

**`example`**
```
var heart = sheet.shapes.add("Shape1", GC.Spread.Sheets.Shapes.AutoShapeType.heart, 100, 60, 200, 160);
var state = heart.allowRotate();
heart.allowRotate(!state);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `value?` | `boolean` | The setting for whether to disable rotating the shape. |

#### Returns

`any`

If no value is set, returns the setting for whether to disable rotating the shape.

#### Inherited from

[Shape](GC.Spread.Sheets.Shapes.Shape).[allowRotate](GC.Spread.Sheets.Shapes.Shape#allowrotate)

___

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

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

Gets or sets the alternative text of the shape for screen readers.

**`example`**
```
var heart = sheet.shapes.add("Shape1", GC.Spread.Sheets.Shapes.AutoShapeType.heart, 100, 60, 200, 160);
heart.alt("A heart shape");
```

#### Parameters

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

#### Returns

`any`

The alternative text of the shape.

#### Inherited from

[Shape](GC.Spread.Sheets.Shapes.Shape).[alt](GC.Spread.Sheets.Shapes.Shape#alt)

___

### <a id="canprint" name="canprint"></a> canPrint

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

Gets or sets whether this shape is printable.

**`example`**
```
var heart = sheet.shapes.add("Shape1", GC.Spread.Sheets.Shapes.AutoShapeType.heart, 100, 60, 200, 160);
var state = heart.canPrint(); // Get whether the shape is printable, defaulat value is true.
workbook.print(); // The heart shape is printed.
heart.canPrint(false);
workbook.print(); // The heart shape is not printed.
```

#### Parameters

| Name | Type |
| :------ | :------ |
| `value?` | `boolean` |

#### Returns

`any`

If no value is set, returns whether this shape is printable.

#### Inherited from

[Shape](GC.Spread.Sheets.Shapes.Shape).[canPrint](GC.Spread.Sheets.Shapes.Shape#canprint)

___

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

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

Gets or sets whether the shape moves when hiding or showing, resizing, or moving rows or columns.

**`example`**
```
var heart = sheet.shapes.add("Shape1", GC.Spread.Sheets.Shapes.AutoShapeType.heart, 100, 60, 200, 160);
var state = heart.dynamicMove();
heart.dynamicMove(!state);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `value?` | `boolean` | The value indicates whether the shape moves when hiding or showing, resizing, or moving rows or columns. |

#### Returns

`any`

If no value is set, returns whether this shape dynamically moves.

#### Inherited from

[Shape](GC.Spread.Sheets.Shapes.Shape).[dynamicMove](GC.Spread.Sheets.Shapes.Shape#dynamicmove)

___

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

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

Gets or sets whether the size of the shape changes when hiding or showing, resizing, or moving rows or columns.

**`example`**
```
var heart = sheet.shapes.add("Shape1", GC.Spread.Sheets.Shapes.AutoShapeType.heart, 100, 60, 200, 160);
var state = heart.dynamicSize();
heart.dynamicSize(!state);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `value?` | `boolean` | The value indicates whether the size of the shape changes when hiding or showing, resizing, or moving rows or columns. |

#### Returns

`any`

If no value is set, returns whether this shape dynamically changes size.

#### Inherited from

[Shape](GC.Spread.Sheets.Shapes.Shape).[dynamicSize](GC.Spread.Sheets.Shapes.Shape#dynamicsize)

___

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

▸ **enabled**(`v?`): `boolean`

Gets or Sets the enabled of form control shape.

#### Parameters

| Name | Type |
| :------ | :------ |
| `v?` | `boolean` |

#### Returns

`boolean`

___

### <a id="endcolumn" name="endcolumn"></a> endColumn

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

Gets or sets the end column index of the shape position.

**`example`**
```
var heart = sheet.shapes.add("Shape1", GC.Spread.Sheets.Shapes.AutoShapeType.heart, 100, 60, 200, 160);
var n = heart.endColumn();
heart.endColumn(n + 1);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `value?` | `number` | The end column index of the shape position. |

#### Returns

`any`

If no value is set, returns the end column index of the shape position.

#### Inherited from

[Shape](GC.Spread.Sheets.Shapes.Shape).[endColumn](GC.Spread.Sheets.Shapes.Shape#endcolumn)

___

### <a id="endcolumnoffset" name="endcolumnoffset"></a> endColumnOffset

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

Gets or sets the offset relative to the end column of the shape.

**`example`**
```
var heart = sheet.shapes.add("Shape1", GC.Spread.Sheets.Shapes.AutoShapeType.heart, 100, 60, 200, 160);
var n = heart.endColumnOffset();
heart.endColumnOffset(0);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `value?` | `number` | The offset relative to the end column of the shape. |

#### Returns

`any`

If no value is set, returns the offset relative to the end column of the shape.

#### Inherited from

[Shape](GC.Spread.Sheets.Shapes.Shape).[endColumnOffset](GC.Spread.Sheets.Shapes.Shape#endcolumnoffset)

___

### <a id="endrow" name="endrow"></a> endRow

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

Gets or sets the end row index of the shape position.

**`example`**
```
var heart = sheet.shapes.add("Shape1", GC.Spread.Sheets.Shapes.AutoShapeType.heart, 100, 60, 200, 160);
var n = heart.endRow();
heart.endRow(n + 2);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `value?` | `number` | The end row index of the shape position. |

#### Returns

`any`

If no value is set, returns the end row index of the shape position.

#### Inherited from

[Shape](GC.Spread.Sheets.Shapes.Shape).[endRow](GC.Spread.Sheets.Shapes.Shape#endrow)

___

### <a id="endrowoffset" name="endrowoffset"></a> endRowOffset

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

Gets or sets the offset relative to the end row of the shape.

**`example`**
```
var heart = sheet.shapes.add("Shape1", GC.Spread.Sheets.Shapes.AutoShapeType.heart, 100, 60, 200, 160);
var n = heart.endRowOffset();
heart.endRowOffset(0);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `value?` | `number` | The offset relative to the end row of the shape. |

#### Returns

`any`

If no value is set, returns the offset relative to the end row of the shape.

#### Inherited from

[Shape](GC.Spread.Sheets.Shapes.Shape).[endRowOffset](GC.Spread.Sheets.Shapes.Shape#endrowoffset)

___

### <a id="formcontroltype" name="formcontroltype"></a> formControlType

▸ **formControlType**(): [`FormControlType`](../enums/GC.Spread.Sheets.Shapes.FormControlType)

Gets FormControl specific type.

#### Returns

[`FormControlType`](../enums/GC.Spread.Sheets.Shapes.FormControlType)

___

### <a id="getformula" name="getformula"></a> getFormula

▸ **getFormula**(`path`): `string`

Gets the formula string from the shape by the path.

**`example`**
```
sheet.name("Sheet1");
sheet.setValue(0, 1, "This is a rectangle.");
var shape1 = sheet.shapes.add("myShape1", GC.Spread.Sheets.Shapes.AutoShapeType.rectangle, 100, 100, 200, 200);
shape1.setFormula("text", "=Sheet1!B1");
shape1.getFormula("text");//returns "=Sheet1!B1"
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `path` | `string` | The path which can accept a formula string, it could be one of "x", "y", "width", "height", "rotate", "text", "style.fill.color", "style.fill.transparency", "style.fill.src", "style.fill.tilePictureAsTexture", "style.fill.offsetLeft", "style.fill.offsetRight", "style.fill.offsetTop", "style.fill.offsetBottom", "style.fill.offsetX", "style.fill.offsetY", "style.fill.scaleX", "style.fill.scaleY", "style.fill.alignment", "style.fill.mirrorType", "style.fill.type", "style.fill.angle", "style.fill.direction", "style.fill.stops.0.color", "style.fill.stops.0.position", "style.fill.stops.0.transparency", "style.fill.stops.0.brightness", "style.line.color", "style.line.lineStyle", "style.line.width", "style.line.capType", "style.line.joinType", "style.line.compoundType",  "style.line.transparency", "style.textEffect.color", "style.textEffect.transparency", "style.textEffect.font", "style.textFrame.vAlign", "style.textFrame.hAlign". |

#### Returns

`string`

Returns the formula string from the shape by the path.

#### Inherited from

[Shape](GC.Spread.Sheets.Shapes.Shape).[getFormula](GC.Spread.Sheets.Shapes.Shape#getformula)

___

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

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

Gets or sets the height of the shape.

**`example`**
```
var heart = sheet.shapes.add("Shape1", GC.Spread.Sheets.Shapes.AutoShapeType.heart, 100, 60, 200, 160);
var n = heart.height();
heart.height(n + 50);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `value?` | `string` \| `number` | The height of the shape specified by a number or formula (starts with =) can get a number value. |

#### Returns

`any`

If no value is set, returns the height of the shape.

#### Inherited from

[Shape](GC.Spread.Sheets.Shapes.Shape).[height](GC.Spread.Sheets.Shapes.Shape#height)

___

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

▸ **hyperlink**(`value?`): `void` \| [`IHyperlink`](../interfaces/GC.Spread.Sheets.IHyperlink)

Gets or sets the hyperlink of the shape.

**`example`**
```
var shape = sheet.shapes.add("myShape", GC.Spread.Sheets.Shapes.AutoShapeType.rectangle, 62 * 9, 0, 200, 200);
shape.hyperlink({url: "http://www.spreadjs.com", target: 0, tooltip: 'goes to SpreadJS'});
```

#### Parameters

| Name | Type |
| :------ | :------ |
| `value?` | [`IHyperlink`](../interfaces/GC.Spread.Sheets.IHyperlink) |

#### Returns

`void` \| [`IHyperlink`](../interfaces/GC.Spread.Sheets.IHyperlink)

If no value is set, returns the current hyperlink settings of the shape.

#### Inherited from

[Shape](GC.Spread.Sheets.Shapes.Shape).[hyperlink](GC.Spread.Sheets.Shapes.Shape#hyperlink)

___

### <a id="islocked" name="islocked"></a> isLocked

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

Gets or sets whether this shape is locked.

**`example`**
```
var heart = sheet.shapes.add("Shape1", GC.Spread.Sheets.Shapes.AutoShapeType.heart, 100, 60, 200, 160);
var state = heart.isLocked();
heart.isLocked(!state);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `value?` | `boolean` | The value that indicates whether this shape is locked. |

#### Returns

`any`

If no value is set, returns whether this shape is locked.

#### Inherited from

[Shape](GC.Spread.Sheets.Shapes.Shape).[isLocked](GC.Spread.Sheets.Shapes.Shape#islocked)

___

### <a id="isselected" name="isselected"></a> isSelected

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

Gets or sets whether this shape is selected.

**`example`**
```
var heart = sheet.shapes.add("Shape1", GC.Spread.Sheets.Shapes.AutoShapeType.heart, 100, 60, 200, 160);
var state = heart.isSelected();
heart.isSelected(!state);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `value?` | `boolean` | The value that indicates whether this shape is selected. |

#### Returns

`any`

If no value is set, returns whether this shape is selected.

#### Inherited from

[Shape](GC.Spread.Sheets.Shapes.Shape).[isSelected](GC.Spread.Sheets.Shapes.Shape#isselected)

___

### <a id="istextbox" name="istextbox"></a> isTextBox

▸ **isTextBox**(`value?`): `boolean` \| `void`

Gets or sets the shape is text box.

**`example`**
```
var rectangle = sheet.shapes.add("Shape1", GC.Spread.Sheets.Shapes.AutoShapeType.rectangle, 100, 60, 200, 160);
rectangle.isTextBox(true);
```

#### Parameters

| Name | Type |
| :------ | :------ |
| `value?` | `boolean` |

#### Returns

`boolean` \| `void`

If no value is set, return whether shape is a text box.

#### Inherited from

[Shape](GC.Spread.Sheets.Shapes.Shape).[isTextBox](GC.Spread.Sheets.Shapes.Shape#istextbox)

___

### <a id="isvisible" name="isvisible"></a> isVisible

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

Gets or sets whether this shape is visible.

**`example`**
```
var heart = sheet.shapes.add("Shape1", GC.Spread.Sheets.Shapes.AutoShapeType.heart, 100, 60, 200, 160);
var state = heart.isVisible();
heart.isVisible(!state);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `value?` | `boolean` | The value that indicates whether this shape is visible. |

#### Returns

`any`

If no value is set, returns whether this shape is visible.

#### Inherited from

[Shape](GC.Spread.Sheets.Shapes.Shape).[isVisible](GC.Spread.Sheets.Shapes.Shape#isvisible)

___

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

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

Gets or sets the name of the shape.

**`example`**
```
var shape1 = sheet.shapes.add("myShape1", GC.Spread.Sheets.Shapes.AutoShapeType.rectangle, 62 * 9, 0, 200, 200);
var shape2 = sheet.shapes.add("myShape2", GC.Spread.Sheets.Shapes.AutoShapeType.rectangle, 20, 20, 200, 200);
var shape = sheet.shapes.group([shape1, shape2]);
shape.name("myGroupShape");
var shapeName = shape.name();
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `value?` | `string` | The name of the shape. |

#### Returns

`any`

If no value is set, returns the name of the shape.

#### Inherited from

[Shape](GC.Spread.Sheets.Shapes.Shape).[name](GC.Spread.Sheets.Shapes.Shape#name)

___

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

▸ **options**(`v?`): [`IFormControlShapeOptions`](../modules/GC.Spread.Sheets.Shapes#iformcontrolshapeoptions)

Gets or Sets the options of form control shape.

#### Parameters

| Name | Type |
| :------ | :------ |
| `v?` | [`IFormControlShapeOptions`](../modules/GC.Spread.Sheets.Shapes#iformcontrolshapeoptions) |

#### Returns

[`IFormControlShapeOptions`](../modules/GC.Spread.Sheets.Shapes#iformcontrolshapeoptions)

___

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

▸ **rotate**(`value?`): `number` \| `void`

Gets or sets the rotated angle of the shape (unit in degree).

**`example`**
```
var heart = sheet.shapes.add("Shape1", GC.Spread.Sheets.Shapes.AutoShapeType.heart, 100, 60, 200, 160);
var n = heart.rotate();
heart.rotate(n + 30);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `value?` | `string` \| `number` | The rotated angle of the shape (unit in degree) specified by a number or formula (starts with =) can get a number value. |

#### Returns

`number` \| `void`

If no value is set, returns the rotated angle of the shape (unit in degree).

#### Inherited from

[Shape](GC.Spread.Sheets.Shapes.Shape).[rotate](GC.Spread.Sheets.Shapes.Shape#rotate)

___

### <a id="setformula" name="setformula"></a> setFormula

▸ **setFormula**(`path`, `formula`): `void`

Sets the formula string to the shape by the path.

**`example`**
```
sheet.name("Sheet1");
sheet.setValue(0, 1, "This is a rectangle.");
var shape1 = sheet.shapes.add("myShape1", GC.Spread.Sheets.Shapes.AutoShapeType.rectangle, 100, 100, 200, 200);
shape1.setFormula("text", "=Sheet1!B1");
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `path` | `string` | The path which can accept a formula string, it could be one of "x", "y", "width", "height", "rotate", "text", "style.fill.color", "style.fill.transparency", "style.fill.src", "style.fill.tilePictureAsTexture", "style.fill.offsetLeft", "style.fill.offsetRight", "style.fill.offsetTop", "style.fill.offsetBottom", "style.fill.offsetX", "style.fill.offsetY", "style.fill.scaleX", "style.fill.scaleY", "style.fill.alignment", "style.fill.mirrorType", "style.fill.type", "style.fill.angle", "style.fill.direction", "style.fill.stops.0.color", "style.fill.stops.0.position", "style.fill.stops.0.transparency", "style.fill.stops.0.brightness", "style.line.color", "style.line.lineStyle", "style.line.width", "style.line.capType", "style.line.joinType", "style.line.compoundType", "style.line.transparency", "style.textEffect.color", "style.textEffect.transparency", "style.textEffect.font", "style.textFrame.vAlign", "style.textFrame.hAlign". |
| `formula` | `string` | The formula string. |

#### Returns

`void`

#### Inherited from

[Shape](GC.Spread.Sheets.Shapes.Shape).[setFormula](GC.Spread.Sheets.Shapes.Shape#setformula)

___

### <a id="showhandle" name="showhandle"></a> showHandle

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

Gets or sets whether to show handle of shape.

**`example`**
```
var heart = sheet.shapes.add("Shape1", GC.Spread.Sheets.Shapes.AutoShapeType.heart, 100, 60, 200, 160);
var state = heart.showHandle();
heart.showHandle(!state);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `value?` | `boolean` | The setting for whether to show handle of shape. |

#### Returns

`any`

If no value is set, returns the setting for whether to show handle of shape.

#### Inherited from

[Shape](GC.Spread.Sheets.Shapes.Shape).[showHandle](GC.Spread.Sheets.Shapes.Shape#showhandle)

___

### <a id="startcolumn" name="startcolumn"></a> startColumn

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

Gets or sets the starting column index of the shape position.

**`example`**
```
var heart = sheet.shapes.add("Shape1", GC.Spread.Sheets.Shapes.AutoShapeType.heart, 100, 60, 200, 160);
var n = heart.startColumn();
heart.startColumn(n + 2);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `value?` | `number` | The starting column index of the shape position. |

#### Returns

`any`

If no value is set, returns the starting column index of the shape position.

#### Inherited from

[Shape](GC.Spread.Sheets.Shapes.Shape).[startColumn](GC.Spread.Sheets.Shapes.Shape#startcolumn)

___

### <a id="startcolumnoffset" name="startcolumnoffset"></a> startColumnOffset

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

Gets or sets the offset relative to the start column of the shape.

**`example`**
```
var heart = sheet.shapes.add("Shape1", GC.Spread.Sheets.Shapes.AutoShapeType.heart, 100, 60, 200, 160);
var n = heart.startColumnOffset();
heart.startColumnOffset(0);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `value?` | `number` | The offset relative to the start column of the shape. |

#### Returns

`any`

If no value is set, returns the offset relative to the start column of the shape.

#### Inherited from

[Shape](GC.Spread.Sheets.Shapes.Shape).[startColumnOffset](GC.Spread.Sheets.Shapes.Shape#startcolumnoffset)

___

### <a id="startrow" name="startrow"></a> startRow

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

Gets or sets the starting row index of the shape position.

**`example`**
```
var heart = sheet.shapes.add("Shape1", GC.Spread.Sheets.Shapes.AutoShapeType.heart, 100, 60, 200, 160);
var n = heart.startRow();
heart.startRow(n + 2);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `value?` | `number` | The starting row index of the shape position. |

#### Returns

`any`

If no value is set, returns the starting row index of the shape.

#### Inherited from

[Shape](GC.Spread.Sheets.Shapes.Shape).[startRow](GC.Spread.Sheets.Shapes.Shape#startrow)

___

### <a id="startrowoffset" name="startrowoffset"></a> startRowOffset

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

Gets or sets the offset relative to the start row of the shape.

**`example`**
```
var heart = sheet.shapes.add("Shape1", GC.Spread.Sheets.Shapes.AutoShapeType.heart, 100, 60, 200, 160);
var n = heart.startRowOffset();
heart.startRowOffset(0);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `value?` | `number` | The offset relative to the start row of the shape. |

#### Returns

`any`

If no value is set, returns the offset relative to the start row of the shape.

#### Inherited from

[Shape](GC.Spread.Sheets.Shapes.Shape).[startRowOffset](GC.Spread.Sheets.Shapes.Shape#startrowoffset)

___

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

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

Gets or sets the style of the shape.

**`example`**
```
//This sample sets style for the shape.
var heart = sheet.shapes.add("Shape1", GC.Spread.Sheets.Shapes.AutoShapeType.heart, 100, 60, 200, 160);
var oldStyle = heart.style();
oldStyle.fill.color = "red";
oldStyle.fill.transparency = 0.5;
oldStyle.line.color = "green";
oldStyle.line.lineStyle = GC.Spread.Sheets.Shapes.PresetLineDashStyle.dashDot;
oldStyle.line.width = 5;
oldStyle.line.capType = GC.Spread.Sheets.Shapes.LineCapStyle.square;
oldStyle.line.joinType = GC.Spread.Sheets.Shapes.LineJoinStyle.miter;
oldStyle.line.compoundType = GC.Spread.Sheets.Shapes.CompoundType.double;
oldStyle.line.transparency = 0.5;
oldStyle.textEffect.color = "yellow";
oldStyle.textEffect.transparency = 0.5;
oldStyle.textEffect.font = "20px Arial";
oldStyle.textFrame.vAlign = GC.Spread.Sheets.VerticalAlign.center;
oldStyle.textFrame.hAlign = GC.Spread.Sheets.HorizontalAlign.center;
heart.style(oldStyle);
heart.text("Heart");
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `value?` | [`ShapeStyle`](GC.Spread.Sheets.Shapes.ShapeStyle) | The shape style. |

#### Returns

`any`

If no value is set, returns the current style of the shape.

#### Inherited from

[Shape](GC.Spread.Sheets.Shapes.Shape).[style](GC.Spread.Sheets.Shapes.Shape#style)

___

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

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

Gets or sets the text of the shape.

**`example`**
```
var heart = sheet.shapes.add("Shape1", GC.Spread.Sheets.Shapes.AutoShapeType.heart, 100, 60, 200, 160);
heart.text("My Shape");
var s = heart.text();
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `value?` | `string` | The text of the shape specified by a string or formula (starts with =) can get a string. |

#### Returns

`any`

If no value is set, returns the text of the shape.

#### Inherited from

[Shape](GC.Spread.Sheets.Shapes.Shape).[text](GC.Spread.Sheets.Shapes.Shape#text)

___

### <a id="toimagesrc" name="toimagesrc"></a> toImageSrc

▸ **toImageSrc**(): `string`

Get the shape Image src of type Base64 string.

**`example`**
```
let shapeImageSrc = sheet.shapes.all()[0].toImageSrc();
```

#### Returns

`string`

return the shape Image Base64 src string.

#### Inherited from

[Shape](GC.Spread.Sheets.Shapes.Shape).[toImageSrc](GC.Spread.Sheets.Shapes.Shape#toimagesrc)

___

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

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

Gets or sets the type of the shape.

**`example`**
```
var heart = sheet.shapes.add("Shape1", GC.Spread.Sheets.Shapes.AutoShapeType.heart, 100, 60, 200, 160);
var n = heart.type();
heart.type(GC.Spread.Sheets.Shapes.AutoShapeType.cloud);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `value?` | [`AutoShapeType`](../enums/GC.Spread.Sheets.Shapes.AutoShapeType) | The type of the shape. |

#### Returns

`any`

If no value is set, returns the type of the shape.

#### Inherited from

[Shape](GC.Spread.Sheets.Shapes.Shape).[type](GC.Spread.Sheets.Shapes.Shape#type)

___

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

▸ **value**(`v?`): [`IFormControlShapeValue`](../modules/GC.Spread.Sheets.Shapes#iformcontrolshapevalue)

Gets or Sets the value of form control shape.

#### Parameters

| Name | Type |
| :------ | :------ |
| `v?` | [`IFormControlShapeValue`](../modules/GC.Spread.Sheets.Shapes#iformcontrolshapevalue) |

#### Returns

[`IFormControlShapeValue`](../modules/GC.Spread.Sheets.Shapes#iformcontrolshapevalue)

___

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

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

Gets or sets the width of the shape.

**`example`**
```
var heart = sheet.shapes.add("Shape1", GC.Spread.Sheets.Shapes.AutoShapeType.heart, 100, 60, 200, 160);
var n = heart.width();
heart.width(n + 50);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `value?` | `string` \| `number` | The width of the shape specified by a number or formula (starts with =) can get a number value. |

#### Returns

`any`

If no value is set, returns the width of the shape.

#### Inherited from

[Shape](GC.Spread.Sheets.Shapes.Shape).[width](GC.Spread.Sheets.Shapes.Shape#width)

___

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

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

Gets or sets the horizontal location of the shape.

**`example`**
```
var heart = sheet.shapes.add("Shape1", GC.Spread.Sheets.Shapes.AutoShapeType.heart, 100, 60, 200, 160);
var n = heart.x();
heart.x(n + 50);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `value?` | `string` \| `number` | The horizontal location of the shape specified by a number or formula (starts with =) can get a number value. |

#### Returns

`any`

If no value is set, returns the horizontal location of the shape.

#### Inherited from

[Shape](GC.Spread.Sheets.Shapes.Shape).[x](GC.Spread.Sheets.Shapes.Shape#x)

___

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

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

Gets or sets the vertical location of the shape.

**`example`**
```
var heart = sheet.shapes.add("Shape1", GC.Spread.Sheets.Shapes.AutoShapeType.heart, 100, 60, 200, 160);
var n = heart.y();
heart.y(n + 50);
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `value?` | `string` \| `number` | The vertical location of the shape specified by a number or formula (starts with =) can get a number value. |

#### Returns

`any`

If no value is set, returns the vertical location of the shape.

#### Inherited from

[Shape](GC.Spread.Sheets.Shapes.Shape).[y](GC.Spread.Sheets.Shapes.Shape#y)
