# GC.Spread.Sheets.FloatingObjects.Picture

## Content

# Class: Picture

[Sheets](../modules/GC.Spread.Sheets).[FloatingObjects](../modules/GC.Spread.Sheets.FloatingObjects).Picture

## Hierarchy

- [`FloatingObject`](GC.Spread.Sheets.FloatingObjects.FloatingObject)

  ↳ **`Picture`**

## Table of contents

### Constructors

- [constructor](GC.Spread.Sheets.FloatingObjects.Picture#constructor)

### Properties

- [typeName](GC.Spread.Sheets.FloatingObjects.Picture#typename)

### Methods

- [allowMove](GC.Spread.Sheets.FloatingObjects.Picture#allowmove)
- [allowResize](GC.Spread.Sheets.FloatingObjects.Picture#allowresize)
- [alt](GC.Spread.Sheets.FloatingObjects.Picture#alt)
- [backColor](GC.Spread.Sheets.FloatingObjects.Picture#backcolor)
- [borderColor](GC.Spread.Sheets.FloatingObjects.Picture#bordercolor)
- [borderRadius](GC.Spread.Sheets.FloatingObjects.Picture#borderradius)
- [borderStyle](GC.Spread.Sheets.FloatingObjects.Picture#borderstyle)
- [borderWidth](GC.Spread.Sheets.FloatingObjects.Picture#borderwidth)
- [cloneContent](GC.Spread.Sheets.FloatingObjects.Picture#clonecontent)
- [content](GC.Spread.Sheets.FloatingObjects.Picture#content)
- [dynamicMove](GC.Spread.Sheets.FloatingObjects.Picture#dynamicmove)
- [dynamicSize](GC.Spread.Sheets.FloatingObjects.Picture#dynamicsize)
- [endColumn](GC.Spread.Sheets.FloatingObjects.Picture#endcolumn)
- [endColumnOffset](GC.Spread.Sheets.FloatingObjects.Picture#endcolumnoffset)
- [endRow](GC.Spread.Sheets.FloatingObjects.Picture#endrow)
- [endRowOffset](GC.Spread.Sheets.FloatingObjects.Picture#endrowoffset)
- [fixedPosition](GC.Spread.Sheets.FloatingObjects.Picture#fixedposition)
- [getHost](GC.Spread.Sheets.FloatingObjects.Picture#gethost)
- [getOriginalHeight](GC.Spread.Sheets.FloatingObjects.Picture#getoriginalheight)
- [getOriginalWidth](GC.Spread.Sheets.FloatingObjects.Picture#getoriginalwidth)
- [height](GC.Spread.Sheets.FloatingObjects.Picture#height)
- [isLocked](GC.Spread.Sheets.FloatingObjects.Picture#islocked)
- [isSelected](GC.Spread.Sheets.FloatingObjects.Picture#isselected)
- [isVisible](GC.Spread.Sheets.FloatingObjects.Picture#isvisible)
- [name](GC.Spread.Sheets.FloatingObjects.Picture#name)
- [pictureStretch](GC.Spread.Sheets.FloatingObjects.Picture#picturestretch)
- [refreshContent](GC.Spread.Sheets.FloatingObjects.Picture#refreshcontent)
- [src](GC.Spread.Sheets.FloatingObjects.Picture#src)
- [startColumn](GC.Spread.Sheets.FloatingObjects.Picture#startcolumn)
- [startColumnOffset](GC.Spread.Sheets.FloatingObjects.Picture#startcolumnoffset)
- [startRow](GC.Spread.Sheets.FloatingObjects.Picture#startrow)
- [startRowOffset](GC.Spread.Sheets.FloatingObjects.Picture#startrowoffset)
- [width](GC.Spread.Sheets.FloatingObjects.Picture#width)
- [x](GC.Spread.Sheets.FloatingObjects.Picture#x)
- [y](GC.Spread.Sheets.FloatingObjects.Picture#y)

## Constructors

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

• **new Picture**(`name`, `src`, `x`, `y`, `width`, `height`)

Represents a picture.

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `name` | `string` | The name of the picture. |
| `src` | `string` | The image source of the picture. |
| `x` | `number` | The <i>x</i> location of the picture. |
| `y` | `number` | The <i>y</i> location of the picture. |
| `width` | `number` | The width of the picture. |
| `height` | `number` | The height of the picture. |

#### Overrides

[FloatingObject](GC.Spread.Sheets.FloatingObjects.FloatingObject).[constructor](GC.Spread.Sheets.FloatingObjects.FloatingObject#constructor)

## Properties

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

• **typeName**: `string`

Represents the type name string used for supporting serialization.

**`example`**
```javascript
var customFloatingObject = new GC.Spread.Sheets.FloatingObjects.FloatingObject('floatingObject', 10, 10, 64, 30);
console.log(customFloatingObject.typeName); // "0"
```

#### Inherited from

[FloatingObject](GC.Spread.Sheets.FloatingObjects.FloatingObject).[typeName](GC.Spread.Sheets.FloatingObjects.FloatingObject#typename)

## Methods

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

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

Gets or sets whether to disable moving the floating object.

**`example`**
```javascript
//This example prevents you from moving or resizing the floating object.
var customFloatingObject = new GC.Spread.Sheets.FloatingObjects.FloatingObject("f1", 10, 10, 60, 64);
var btn = document.createElement('button');
btn.style.width = "60px";
btn.style.height = "30px";
btn.innerText = "button";
customFloatingObject.allowResize(false);
customFloatingObject.allowMove(false);
customFloatingObject.content(btn);
activeSheet.floatingObjects.add(customFloatingObject);
```

#### Parameters

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

#### Returns

`any`

If no value is set, returns the setting for whether to disable moving the floating object; otherwise, returns the floating object.

#### Inherited from

[FloatingObject](GC.Spread.Sheets.FloatingObjects.FloatingObject).[allowMove](GC.Spread.Sheets.FloatingObjects.FloatingObject#allowmove)

___

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

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

Gets or sets whether to disable resizing the floating object.

**`example`**
```javascript
//This example prevents you from moving or resizing the floating object.
var customFloatingObject = new GC.Spread.Sheets.FloatingObjects.FloatingObject("f1", 10, 10, 60, 64);
var btn = document.createElement('button');
btn.style.width = "60px";
btn.style.height = "30px";
btn.innerText = "button";
customFloatingObject.allowResize(false);
customFloatingObject.allowMove(false);
customFloatingObject.content(btn);
activeSheet.floatingObjects.add(customFloatingObject);
```

#### Parameters

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

#### Returns

`any`

If no value is set, returns the setting for whether to disable resizing the floating object; otherwise, returns the floating object.

#### Inherited from

[FloatingObject](GC.Spread.Sheets.FloatingObjects.FloatingObject).[allowResize](GC.Spread.Sheets.FloatingObjects.FloatingObject#allowresize)

___

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

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

Gets or sets the alternative text of the floating object for screen readers.

**`example`**
```javascript
var customFloatingObject = new GC.Spread.Sheets.FloatingObjects.FloatingObject('f1', 10, 10, 60, 64);
var btn = document.createElement('button');
btn.style.width = "60px";
btn.style.height = "30px";
btn.innerText = "button";
customFloatingObject.content(btn);
customFloatingObject.alt("A button");
activeSheet.floatingObjects.add(customFloatingObject);
```

#### Parameters

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

#### Returns

`any`

The alternative text of the floating object.

#### Inherited from

[FloatingObject](GC.Spread.Sheets.FloatingObjects.FloatingObject).[alt](GC.Spread.Sheets.FloatingObjects.FloatingObject#alt)

___

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

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

Gets or sets the background color of the picture.

**`example`**
```javascript
//This example sets the backcolor of the picture.
var picture = activeSheet.pictures.add("f2","Event.png",50,50,100,100);
picture.borderStyle("solid");
picture.borderWidth(2);
picture.borderColor("red");
```

#### Parameters

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

#### Returns

`any`

If no value is set, returns the backcolor of the picture; otherwise, returns the picture.

___

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

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

Gets or sets the border color of the picture.

**`example`**
```javascript
//This example sets the border color of the picture.
var picture = activeSheet.pictures.add("f2","Event.png",50,50,100,100);
picture.borderStyle("solid");
picture.borderWidth(2);
picture.borderColor("red");
```

#### Parameters

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

#### Returns

`any`

If no value is set, returns the border color of the picture; otherwise, returns the picture.

___

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

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

Gets or sets the border radius of the picture.

**`example`**
```javascript
//This example uses the borderRadius method.
var picture = activeSheet.pictures.add("f2","Event.png",50,50,100,100);
picture.backColor("blue");
picture.borderWidth(2);
picture.borderColor("red");
picture.borderStyle("dotted");
picture.borderRadius(5);
```

#### Parameters

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

#### Returns

`any`

If no value is set, returns the border radius of the picture; otherwise, returns the picture.

___

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

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

Gets or sets the border style of the picture.

**`example`**
```javascript
//This example uses the borderStyle method.
var picture = activeSheet.pictures.add("f2","Event.png",50,50,100,100);
picture.borderStyle("dotted");
picture.borderWidth(2);
picture.borderColor("red");
```

#### Parameters

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

#### Returns

`any`

If no value is set, returns the border style of the picture; otherwise, returns the picture.

___

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

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

Gets or sets the border width of the picture.

**`example`**
```javascript
//This example uses the borderWidth method.
var picture = activeSheet.pictures.add("f2","Event.png",50,50,100,100);
picture.borderStyle("solid");
picture.borderWidth(2);
picture.borderColor("red");
```

#### Parameters

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

#### Returns

`any`

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

___

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

▸ **cloneContent**(): `HTMLElement`

Gets a copy of the current content of the instance.

**`example`**
```javascript
var customFloatingObject = new GC.Spread.Sheets.FloatingObjects.FloatingObject('f1', 10, 10, 64, 30);
customFloatingObject.content(createButton('button 1', '64px', '30px'));
activeSheet.floatingObjects.add(customFloatingObject);

var btn = customFloatingObject.cloneContent();
btn.innerText = 'button 2';
customFloatingObject.content(btn);

function createButton (text, width, height) {
    var btn = document.createElement('button');
    btn.style.width = width;
    btn.style.height = height;
    btn.innerText = text;
    return btn;
}
```

#### Returns

`HTMLElement`

A copy of the current content of the instance.

#### Inherited from

[FloatingObject](GC.Spread.Sheets.FloatingObjects.FloatingObject).[cloneContent](GC.Spread.Sheets.FloatingObjects.FloatingObject#clonecontent)

___

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

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

Gets or sets the content of the custom floating object.

**`example`**
```javascript
var customFloatingObject = new GC.Spread.Sheets.FloatingObjects.FloatingObject('f1', 10, 10, 64, 30);
customFloatingObject.content(createButton('button 1', '64px', '30px'));
activeSheet.floatingObjects.add(customFloatingObject);

console.log(customFloatingObject.content()); // get current content, the result is button element with the text "button 1".
customFloatingObject.content(createButton('button 2', '64px', '30px')); // set new content.

function createButton (text, width, height) {
    var btn = document.createElement('button');
    btn.style.width = width;
    btn.style.height = height;
    btn.innerText = text;
    return btn;
}
```

#### Parameters

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

#### Returns

`any`

If no value is set, returns the content of the custom floating object; otherwise, returns the floating object.

#### Inherited from

[FloatingObject](GC.Spread.Sheets.FloatingObjects.FloatingObject).[content](GC.Spread.Sheets.FloatingObjects.FloatingObject#content)

___

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

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

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

**`example`**
```javascript
//This example creates a floating object.
var customFloatingObject = new GC.Spread.Sheets.FloatingObjects.FloatingObject("f1", 10, 10, 60, 64);
customFloatingObject.isVisible(true);
customFloatingObject.dynamicSize(true);
customFloatingObject.dynamicMove(true);
var btn = document.createElement('button');
btn.style.width = "60px";
btn.style.height = "30px";
btn.innerText = "button";
customFloatingObject.content(btn);
activeSheet.floatingObjects.add(customFloatingObject);
```

#### Parameters

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

#### Returns

`any`

If no value is set, returns whether this floating object dynamically moves; otherwise, returns the floating object.

#### Inherited from

[FloatingObject](GC.Spread.Sheets.FloatingObjects.FloatingObject).[dynamicMove](GC.Spread.Sheets.FloatingObjects.FloatingObject#dynamicmove)

___

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

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

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

**`example`**
```javascript
//This example creates a floating object.
var customFloatingObject = new GC.Spread.Sheets.FloatingObjects.FloatingObject("f1", 10, 10, 60, 64);
customFloatingObject.isVisible(true);
customFloatingObject.dynamicSize(true);
customFloatingObject.dynamicMove(true);
var btn = document.createElement('button');
btn.style.width = "60px";
btn.style.height = "30px";
btn.innerText = "button";
customFloatingObject.content(btn);
activeSheet.floatingObjects.add(customFloatingObject);
```

#### Parameters

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

#### Returns

`any`

If no value is set, returns whether this floating object dynamically changes size; otherwise, returns the floating object.

#### Inherited from

[FloatingObject](GC.Spread.Sheets.FloatingObjects.FloatingObject).[dynamicSize](GC.Spread.Sheets.FloatingObjects.FloatingObject#dynamicsize)

___

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

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

Gets or sets the end column index of the floating object position.

**`example`**
```javascript
//Creates a floating object.
var customFloatingObject = new GC.Spread.Sheets.FloatingObjects.FloatingObject("f1", 10, 10, 60, 64);
var btn = document.createElement('button');
btn.style.width = "60px";
btn.style.height = "30px";
btn.innerText = "button";
customFloatingObject.content(btn);
activeSheet.floatingObjects.add(customFloatingObject);
//Position the upper left corner of the floating object by cell anchors.
customFloatingObject.startRow(2);
customFloatingObject.startColumn(2);
customFloatingObject.startRowOffset(10);
customFloatingObject.startColumnOffset(10);
//Position the lower right corner of the floating object by cell anchors.
customFloatingObject.endRow(7);
customFloatingObject.endColumn(5);
customFloatingObject.endRowOffset(10);
customFloatingObject.endColumnOffset(10);
```

#### Parameters

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

#### Returns

`any`

If no value is set, returns the end column index of the floating object position; otherwise, returns the floating object.

#### Inherited from

[FloatingObject](GC.Spread.Sheets.FloatingObjects.FloatingObject).[endColumn](GC.Spread.Sheets.FloatingObjects.FloatingObject#endcolumn)

___

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

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

Gets or sets the offset relative to the end column of the floating object.

**`example`**
```javascript
//Creates a floating object.
var customFloatingObject = new GC.Spread.Sheets.FloatingObjects.FloatingObject("f1", 10, 10, 60, 64);
var btn = document.createElement('button');
btn.style.width = "60px";
btn.style.height = "30px";
btn.innerText = "button";
customFloatingObject.content(btn);
activeSheet.floatingObjects.add(customFloatingObject);
//Position the upper left corner of the floating object by cell anchors.
customFloatingObject.startRow(2);
customFloatingObject.startColumn(2);
customFloatingObject.startRowOffset(10);
customFloatingObject.startColumnOffset(10);
//Position the lower right corner of the floating object by cell anchors.
customFloatingObject.endRow(7);
customFloatingObject.endColumn(5);
customFloatingObject.endRowOffset(10);
customFloatingObject.endColumnOffset(10);
```

#### Parameters

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

#### Returns

`any`

If no value is set, returns the offset relative to the end column of the floating object; otherwise, returns the floating object.

#### Inherited from

[FloatingObject](GC.Spread.Sheets.FloatingObjects.FloatingObject).[endColumnOffset](GC.Spread.Sheets.FloatingObjects.FloatingObject#endcolumnoffset)

___

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

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

Gets or sets the end row index of the floating object position.

**`example`**
```javascript
//Creates a floating object.
var customFloatingObject = new GC.Spread.Sheets.FloatingObjects.FloatingObject("f1", 10, 10, 60, 64);
var btn = document.createElement('button');
btn.style.width = "60px";
btn.style.height = "30px";
btn.innerText = "button";
customFloatingObject.content(btn);
activeSheet.floatingObjects.add(customFloatingObject);
//Position the upper left corner of the floating object by cell anchors.
customFloatingObject.startRow(2);
customFloatingObject.startColumn(2);
customFloatingObject.startRowOffset(10);
customFloatingObject.startColumnOffset(10);
//Position the lower right corner of the floating object by cell anchors.
customFloatingObject.endRow(7);
customFloatingObject.endColumn(5);
customFloatingObject.endRowOffset(10);
customFloatingObject.endColumnOffset(10);
```

#### Parameters

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

#### Returns

`any`

If no value is set, returns the end row index of the floating object position; otherwise, returns the floating object.

#### Inherited from

[FloatingObject](GC.Spread.Sheets.FloatingObjects.FloatingObject).[endRow](GC.Spread.Sheets.FloatingObjects.FloatingObject#endrow)

___

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

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

Gets or sets the offset relative to the end row of the floating object.

**`example`**
```javascript
//Creates a floating object.
var customFloatingObject = new GC.Spread.Sheets.FloatingObjects.FloatingObject("f1", 10, 10, 60, 64);
var btn = document.createElement('button');
btn.style.width = "60px";
btn.style.height = "30px";
btn.innerText = "button";
customFloatingObject.content(btn);
activeSheet.floatingObjects.add(customFloatingObject);
//Position the upper left corner of the floating object by cell anchors.
customFloatingObject.startRow(2);
customFloatingObject.startColumn(2);
customFloatingObject.startRowOffset(10);
customFloatingObject.startColumnOffset(10);
//Position the lower right corner of the floating object by cell anchors.
customFloatingObject.endRow(7);
customFloatingObject.endColumn(5);
customFloatingObject.endRowOffset(10);
customFloatingObject.endColumnOffset(10);
```

#### Parameters

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

#### Returns

`any`

If no value is set, returns the offset relative to the end row of the floating object; otherwise, returns the floating object.

#### Inherited from

[FloatingObject](GC.Spread.Sheets.FloatingObjects.FloatingObject).[endRowOffset](GC.Spread.Sheets.FloatingObjects.FloatingObject#endrowoffset)

___

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

▸ **fixedPosition**(`value`): `any`

Gets or sets whether the position of the floating object is fixed. When fixedPosition is true, dynamicMove and dynamicSize are disabled.

**`example`**
```javascript
//This example sets the position of the object to fixed.
var customFloatingObject = new GC.Spread.Sheets.FloatingObjects.FloatingObject("f1", 10, 10, 60, 64);
customFloatingObject.fixedPosition(true);
var btn = document.createElement('button');
btn.style.width = "60px";
btn.style.height = "30px";
btn.innerText = "button";
customFloatingObject.content(btn);
activeSheet.floatingObjects.add(customFloatingObject);
```

#### Parameters

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

#### Returns

`any`

If no value is set, returns whether the position of the floating object is fixed; otherwise, returns the floating object.

#### Inherited from

[FloatingObject](GC.Spread.Sheets.FloatingObjects.FloatingObject).[fixedPosition](GC.Spread.Sheets.FloatingObjects.FloatingObject#fixedposition)

___

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

▸ **getHost**(): `HTMLElement`[]

Gets the dom host of the custom content.

#### Returns

`HTMLElement`[]

#### Inherited from

[FloatingObject](GC.Spread.Sheets.FloatingObjects.FloatingObject).[getHost](GC.Spread.Sheets.FloatingObjects.FloatingObject#gethost)

___

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

▸ **getOriginalHeight**(): `number`

Gets the original height of the picture.

**`example`**
```javascript
activeSheet.pictures.add("f2","Event.png",2,2,6,6);
activeSheet.pictures.add("f1","tsoutline.png",3,0,6,6);
var picture = activeSheet.pictures.get("f2");
picture.pictureStretch(GC.Spread.Sheets.ImageLayout.center);
//button
$("#button1").click(function () {
  alert(picture.getOriginalHeight());
});
```

#### Returns

`number`

The original height of the picture.

___

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

▸ **getOriginalWidth**(): `number`

Gets the original width of the picture.

**`example`**
```javascript
activeSheet.pictures.add("f2","Event.png",2,2,6,6);
activeSheet.pictures.add("f1","tsoutline.png",3,0,6,6);
var picture = activeSheet.pictures.get("f2");
picture.pictureStretch(GC.Spread.Sheets.ImageLayout.center);
//button
$("#button1").click(function () {
     alert(picture.getOriginalWidth());
});
```

#### Returns

`number`

The original width of the picture.

___

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

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

Gets or sets the height of a floating object.

**`example`**
```javascript
//This example creates a floating object.
var customFloatingObject = new GC.Spread.Sheets.FloatingObjects.FloatingObject("f1");
customFloatingObject.x(10);
customFloatingObject.y(10);
customFloatingObject.width(60);
customFloatingObject.height(64);
var btn = document.createElement('button');
btn.style.width = "60px";
btn.style.height = "30px";
btn.innerText = "button";
customFloatingObject.content(btn);
activeSheet.floatingObjects.add(customFloatingObject);
```

#### Parameters

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

#### Returns

`any`

If no value is set, returns the height of a floating object; otherwise, returns the floating object.

#### Inherited from

[FloatingObject](GC.Spread.Sheets.FloatingObjects.FloatingObject).[height](GC.Spread.Sheets.FloatingObjects.FloatingObject#height)

___

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

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

Gets or sets whether this floating object is locked.

**`example`**
```javascript
var customFloatingObject = new GC.Spread.Sheets.FloatingObjects.FloatingObject("f1");
customFloatingObject.x(10);
customFloatingObject.y(10);
customFloatingObject.width(60);
customFloatingObject.height(64);
customFloatingObject.isLocked(true);
var btn = document.createElement('button');
btn.style.width = "60px";
btn.style.height = "30px";
btn.innerText = "button";
customFloatingObject.content(btn);
activeSheet.floatingObjects.add(customFloatingObject);
activeSheet.options.isProtected = true;
```

#### Parameters

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

#### Returns

`any`

If no value is set, returns whether this floating object is locked; otherwise, returns the floating object.

#### Inherited from

[FloatingObject](GC.Spread.Sheets.FloatingObjects.FloatingObject).[isLocked](GC.Spread.Sheets.FloatingObjects.FloatingObject#islocked)

___

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

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

Gets or sets whether this floating object is selected.

**`example`**
```javascript
//This example creates a floating object.
var customFloatingObject = new GC.Spread.Sheets.FloatingObjects.FloatingObject("f1", 10, 10, 60, 64);
customFloatingObject.isSelected(true);
var btn = document.createElement('button');
btn.style.width = "60px";
btn.style.height = "30px";
btn.innerText = "button";
customFloatingObject.content(btn);
activeSheet.floatingObjects.add(customFloatingObject);
```

#### Parameters

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

#### Returns

`any`

If no value is set, returns whether this floating object is selected; otherwise, returns the floating object.

#### Inherited from

[FloatingObject](GC.Spread.Sheets.FloatingObjects.FloatingObject).[isSelected](GC.Spread.Sheets.FloatingObjects.FloatingObject#isselected)

___

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

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

Gets or sets whether this floating object is visible.

**`example`**
```javascript
//This example creates a floating object.
var customFloatingObject = new GC.Spread.Sheets.FloatingObjects.FloatingObject("f1", 10, 10, 60, 64);
customFloatingObject.isVisible(true);
customFloatingObject.dynamicSize(true);
customFloatingObject.dynamicMove(true);
var btn = document.createElement('button');
btn.style.width = "60px";
btn.style.height = "30px";
btn.innerText = "button";
customFloatingObject.content(btn);
activeSheet.floatingObjects.add(customFloatingObject);
```

#### Parameters

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

#### Returns

`any`

If no value is set, returns whether this floating object is visible; otherwise, returns the floating object.

#### Inherited from

[FloatingObject](GC.Spread.Sheets.FloatingObjects.FloatingObject).[isVisible](GC.Spread.Sheets.FloatingObjects.FloatingObject#isvisible)

___

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

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

Gets the name of the floating object.

**`example`**
```javascript
//This example uses the name method.
var customFloatingObject = new GC.Spread.Sheets.FloatingObjects.FloatingObject();
customFloatingObject.name("f1");
customFloatingObject.x(10);
customFloatingObject.y(10);
customFloatingObject.width(60);
customFloatingObject.height(64);
var btn = document.createElement('button');
btn.style.width = "60px";
btn.style.height = "30px";
btn.innerText = "button";
customFloatingObject.content(btn);
activeSheet.floatingObjects.add(customFloatingObject);
```

#### Parameters

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

#### Returns

`any`

If no value is set, returns the name of the floating object; otherwise, returns the floating object.

#### Inherited from

[FloatingObject](GC.Spread.Sheets.FloatingObjects.FloatingObject).[name](GC.Spread.Sheets.FloatingObjects.FloatingObject#name)

___

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

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

Gets or sets the stretch of the picture.

**`example`**
```javascript
//This example uses the pictureStretch method.
var picture = activeSheet.pictures.add("f2","Event.png",50,50,100,100);
picture.pictureStretch(GC.Spread.Sheets.ImageLayout.stretch);
picture.backColor("blue");
```

#### Parameters

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

#### Returns

`any`

If no value is set, returns the stretch of the picture; otherwise, returns the picture.

___

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

▸ **refreshContent**(): `void`

Refresh the content in floatingObject.The user should override this method to make their content synchronize with the floatingObject.

**`example`**
```javascript
var customFloatingObject = new GC.Spread.Sheets.FloatingObjects.FloatingObject('floatingObject', 10, 10, 64, 30);
var btn = document.createElement('button');
btn.style.width = "60px";
btn.style.height = "30px";
btn.innerText = "button";
customFloatingObject.content(btn);
//hide the floatingObject
customFloatingObject.isVisible(false);
activeSheet.floatingObjects.add(customFloatingObject);

//show the floatingObject
customFloatingObject.isVisible(true);
customFloatingObject.refreshContent(customFloatingObject.content());
```

#### Returns

`void`

#### Inherited from

[FloatingObject](GC.Spread.Sheets.FloatingObjects.FloatingObject).[refreshContent](GC.Spread.Sheets.FloatingObjects.FloatingObject#refreshcontent)

___

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

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

Gets or sets the src of the picture.

**`example`**
```javascript
var pic = sheet.pictures.add("Picture 1", "Event.png", 100, 50, 200, 200);
var src = pic.src(); // get current image source, the result is "Event.png".
pic.src("tsoutline.png"); // set new image source.
```

#### Parameters

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

#### Returns

`any`

If no value is set, returns the src of the picture; otherwise, returns the picture.

___

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

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

Gets or sets the starting column index of the floating object position.

**`example`**
```javascript
//Creates a floating object.
var customFloatingObject = new GC.Spread.Sheets.FloatingObjects.FloatingObject("f1", 10, 10, 60, 64);
var btn = document.createElement('button');
btn.style.width = "60px";
btn.style.height = "30px";
btn.innerText = "button";
customFloatingObject.content(btn);
activeSheet.floatingObjects.add(customFloatingObject);
//Position the upper left corner of the floating object by cell anchors.
customFloatingObject.startRow(2);
customFloatingObject.startColumn(2);
customFloatingObject.startRowOffset(10);
customFloatingObject.startColumnOffset(10);
```

#### Parameters

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

#### Returns

`any`

If no value is set, returns the starting column index of the floating object position; otherwise, returns the floating object.

#### Inherited from

[FloatingObject](GC.Spread.Sheets.FloatingObjects.FloatingObject).[startColumn](GC.Spread.Sheets.FloatingObjects.FloatingObject#startcolumn)

___

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

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

Gets or sets the offset relative to the start column of the floating object.

**`example`**
```javascript
//Creates a floating object.
var customFloatingObject = new GC.Spread.Sheets.FloatingObjects.FloatingObject("f1", 10, 10, 60, 64);
var btn = document.createElement('button');
btn.style.width = "60px";
btn.style.height = "30px";
btn.innerText = "button";
customFloatingObject.content(btn);
activeSheet.floatingObjects.add(customFloatingObject);
//Position the upper left corner of the floating object by cell anchors.
customFloatingObject.startRow(2);
customFloatingObject.startColumn(2);
customFloatingObject.startRowOffset(10);
customFloatingObject.startColumnOffset(10);
```

#### Parameters

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

#### Returns

`any`

If no value is set, returns the offset relative to the start column of the floating object; otherwise, returns the floating object.

#### Inherited from

[FloatingObject](GC.Spread.Sheets.FloatingObjects.FloatingObject).[startColumnOffset](GC.Spread.Sheets.FloatingObjects.FloatingObject#startcolumnoffset)

___

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

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

Gets or sets the starting row index of the floating object position.

**`example`**
```javascript
//Creates a floating object.
var customFloatingObject = new GC.Spread.Sheets.FloatingObjects.FloatingObject("f1", 10, 10, 60, 64);
var btn = document.createElement('button');
btn.style.width = "60px";
btn.style.height = "30px";
btn.innerText = "button";
customFloatingObject.content(btn);
activeSheet.floatingObjects.add(customFloatingObject);
//Position the upper left corner of the floating object by cell anchors.
customFloatingObject.startRow(2);
customFloatingObject.startColumn(2);
customFloatingObject.startRowOffset(10);
customFloatingObject.startColumnOffset(10);
```

#### Parameters

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

#### Returns

`any`

If no value is set, returns the starting row index of the floating object position; otherwise, returns the floating object.

#### Inherited from

[FloatingObject](GC.Spread.Sheets.FloatingObjects.FloatingObject).[startRow](GC.Spread.Sheets.FloatingObjects.FloatingObject#startrow)

___

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

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

Gets or sets the offset relative to the start row of the floating object.

**`example`**
```javascript
//This example creates a floating object.
var customFloatingObject = new GC.Spread.Sheets.FloatingObjects.FloatingObject("f1", 10, 10, 60, 64);
var btn = document.createElement('button');
btn.style.width = "60px";
btn.style.height = "30px";
btn.innerText = "button";
customFloatingObject.content(btn);
activeSheet.floatingObjects.add(customFloatingObject);
//Position the upper left corner of the floating object by cell anchors.
customFloatingObject.startRow(2);
customFloatingObject.startColumn(2);
customFloatingObject.startRowOffset(10);
customFloatingObject.startColumnOffset(10);
```

#### Parameters

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

#### Returns

`any`

If no value is set, returns the offset relative to the start row of the floating object; otherwise, returns the floating object.

#### Inherited from

[FloatingObject](GC.Spread.Sheets.FloatingObjects.FloatingObject).[startRowOffset](GC.Spread.Sheets.FloatingObjects.FloatingObject#startrowoffset)

___

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

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

Gets or sets the width of a floating object.

**`example`**
```javascript
//This example creates a floating object.
var customFloatingObject = new GC.Spread.Sheets.FloatingObjects.FloatingObject("f1");
customFloatingObject.x(10);
customFloatingObject.y(10);
customFloatingObject.width(60);
customFloatingObject.height(64);
var btn = document.createElement('button');
btn.style.width = "60px";
btn.style.height = "30px";
btn.innerText = "button";
customFloatingObject.content(btn);
activeSheet.floatingObjects.add(customFloatingObject);
```

#### Parameters

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

#### Returns

`any`

If no value is set, returns the width of a floating object; otherwise, returns the floating object.

#### Inherited from

[FloatingObject](GC.Spread.Sheets.FloatingObjects.FloatingObject).[width](GC.Spread.Sheets.FloatingObjects.FloatingObject#width)

___

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

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

Gets or sets the horizontal location of the floating object.

**`example`**
```javascript
//This example creates a floating object.
var customFloatingObject = new GC.Spread.Sheets.FloatingObjects.FloatingObject("f1");
customFloatingObject.x(10);
customFloatingObject.y(10);
customFloatingObject.width(60);
customFloatingObject.height(64);
var btn = document.createElement('button');
btn.style.width = "60px";
btn.style.height = "30px";
btn.innerText = "button";
customFloatingObject.content(btn);
activeSheet.floatingObjects.add(customFloatingObject);
```

#### Parameters

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

#### Returns

`any`

If no value is set, returns the horizontal location of the floating object; otherwise, returns the floating object.

#### Inherited from

[FloatingObject](GC.Spread.Sheets.FloatingObjects.FloatingObject).[x](GC.Spread.Sheets.FloatingObjects.FloatingObject#x)

___

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

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

Gets or sets the vertical location of the floating object.

**`example`**
```javascript
//This example creates a floating object.
var customFloatingObject = new GC.Spread.Sheets.FloatingObjects.FloatingObject("f1");
customFloatingObject.x(10);
customFloatingObject.y(10);
customFloatingObject.width(60);
customFloatingObject.height(64);
var btn = document.createElement('button');
btn.style.width = "60px";
btn.style.height = "30px";
btn.innerText = "button";
customFloatingObject.content(btn);
activeSheet.floatingObjects.add(customFloatingObject);
```

#### Parameters

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

#### Returns

`any`

If no value is set, returns the vertical location of the floating object; otherwise, returns the floating object.

#### Inherited from

[FloatingObject](GC.Spread.Sheets.FloatingObjects.FloatingObject).[y](GC.Spread.Sheets.FloatingObjects.FloatingObject#y)
