## AddButton(int, int, int, int, string) {#addbutton}

将按钮添加到行列索引处的指定单元格。

```csharp
public Button AddButton(int row, int col, int width, int height, string text)
```

| 范围 | 类型 | 描述 |
| --- | --- | --- |
| row | Int32 | 单元格的行索引。 |
| col | Int32 | 单元格的列索引。 |
| width | Int32 | 按钮的宽度。 |
| height | Int32 | 按钮的高度。 |
| text | String | 按钮文本。 |

### 返回值

添加的按钮。

### 也可以看看

* class [Button](../../button)
* class [CellControlCollection](../../cellcontrolcollection)
* 命名空间 [Aspose.Cells.GridDesktop](../../cellcontrolcollection)
* 部件 [Aspose.Cells.GridDesktop](../../../)

---

## AddButton(string, int, int, string) {#addbutton_2}

按单元格名称将按钮添加到指定单元格。

```csharp
public Button AddButton(string cellName, int width, int height, string text)
```

| 范围 | 类型 | 描述 |
| --- | --- | --- |
| cellName | String | 网格单元的名称。 |
| width | Int32 | 按钮的宽度。 |
| height | Int32 | 按钮的高度。 |
| text | String | 按钮文本。 |

### 返回值

添加的按钮。

### 也可以看看

* class [Button](../../button)
* class [CellControlCollection](../../cellcontrolcollection)
* 命名空间 [Aspose.Cells.GridDesktop](../../cellcontrolcollection)
* 部件 [Aspose.Cells.GridDesktop](../../../)

---

## AddButton(int, int, int, int, string, bool) {#addbutton_1}

将按钮添加到行列索引处的指定单元格。

```csharp
public Button AddButton(int row, int col, int width, int height, string text, bool alwaysVisible)
```

| 范围 | 类型 | 描述 |
| --- | --- | --- |
| row | Int32 | 单元格的行索引。 |
| col | Int32 | 单元格的列索引。 |
| width | Int32 | 按钮的宽度。 |
| height | Int32 | 按钮的高度。 |
| text | String | 按钮文本。 |
| alwaysVisible | Boolean | 如果 Button 应始终可见，则仅适用于 Cell Control Button。 |

### 返回值

添加的按钮。

### 也可以看看

* class [Button](../../button)
* class [CellControlCollection](../../cellcontrolcollection)
* 命名空间 [Aspose.Cells.GridDesktop](../../cellcontrolcollection)
* 部件 [Aspose.Cells.GridDesktop](../../../)

---

## AddButton(string, int, int, string, bool) {#addbutton_3}

按单元格名称将按钮添加到指定单元格。

```csharp
public Button AddButton(string cellName, int width, int height, string text, bool alwaysVisible)
```

| 范围 | 类型 | 描述 |
| --- | --- | --- |
| cellName | String | 网格单元的名称。 |
| width | Int32 | 按钮的宽度。 |
| height | Int32 | 按钮的高度。 |
| text | String | 按钮文本。 |
| alwaysVisible | Boolean | 如果 Button 应始终可见，则仅适用于 Cell Control Button。 |

### 返回值

添加的按钮。

### 也可以看看

* class [Button](../../button)
* class [CellControlCollection](../../cellcontrolcollection)
* 命名空间 [Aspose.Cells.GridDesktop](../../cellcontrolcollection)
* 部件 [Aspose.Cells.GridDesktop](../../../)

<!-- DO NOT EDIT: generated by xmldocmd for Aspose.Cells.GridDesktop.dll -->
