---
name: "tvSetText"
type: command
status: ok
groups: ["GUI Control - Tree View"]
arma3_since: "1.56"
locality: {"argument": null, "effect": null, "server_exec": false}
source: https://community.bistudio.com/wiki/tvSetText
revid: 321506
updated: 2022-05-17T11:22:38Z
---

# tvSetText

*Command · GUI Control - Tree View · Arma 3 v1.56*

## Description

Sets string text to item on given path. IDC means id of parent Tree View.

## Syntax

### Syntax 1

```sqf
tvSetText [idc, path, text]
```

**Parameters:**

- `idc`: [Number](../topics/Number.md)
- `path`: [Array](../topics/Array.md) of [Number](../topics/Number.md)s
- `text`: [String](../topics/String.md)

**Returns:** [Nothing](../topics/Nothing.md)

### Syntax 2

```sqf
control tvSetText [path, text]
```

**Parameters:**

- `control`: [Control](../topics/Control.md)
- `path`: [Array](../topics/Array.md) of [Number](../topics/Number.md)s
- `text`: [String](../topics/String.md)

**Returns:** [Nothing](../topics/Nothing.md)

## Examples

### Example 1

```sqf
tvSetText [101, [0], "Test data"];
```

### Example 2

```sqf
_ctrl tvSetText [[0,0,0], "Test data"];
```

## See also

[tvAdd](../commands/tvAdd.md) · [tvClear](../commands/tvClear.md) · [tvCollapse](../commands/tvCollapse.md) · [tvCount](../commands/tvCount.md) · [tvCurSel](../commands/tvCurSel.md) · [tvData](../commands/tvData.md) · [tvDelete](../commands/tvDelete.md) · [tvExpand](../commands/tvExpand.md) · [tvPicture](../commands/tvPicture.md) · [tvSetCurSel](../commands/tvSetCurSel.md) · [tvSetPicture](../commands/tvSetPicture.md) · [tvSetValue](../commands/tvSetValue.md) · [tvSort](../commands/tvSort.md) · [tvSortByValue](../commands/tvSortByValue.md) · [tvText](../commands/tvText.md) · [tvValue](../commands/tvValue.md)

<sub>Source: [BI Community Wiki — tvSetText](https://community.bistudio.com/wiki/tvSetText) (revision 321506).</sub>
