TextView.SetTag
---------------

Sets the tag string for this text view.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [TextView](component_TextView.md) | [9.2](newinversion92.md) | ✅ Yes | ✅ Yes | ❌ No | ❌ No | ✅ Yes |

MBS( "TextView.SetTag"; TextView { ; Tag } ) 

**MBS**( **"TextView.SetTag";** /\* Sets the tag string for this text view. \*/  
**$TextView**; /\* The reference number to the text view. \*/   
**$Tag**) /\* Optional; A string you want to associate with the text view. \*/ 

### Parameters

| Parameter | Description | Example | Flags |
|---|---|---|---|
| TextView | The reference number to the text view. | $textview |  |
| Tag | A string you want to associate with the text view. |  | Optional |

### Result

Returns OK or error.

### Description

Sets the tag string for this text view.  
Use the tag to store whatever value you want to associate with the text view. You can later query it using [TextView.GetTag](TextViewGetTag.md).  
### See also

- [MapView.SetTag](MapViewSetTag.md)
- [TextView.GetRTF](TextViewGetRTF.md)
- [TextView.GetTag](TextViewGetTag.md)
- [TextView.GetTop](TextViewGetTop.md)
- [TextView.SetFrame](TextViewSetFrame.md)
- [TextView.SetRTF](TextViewSetRTF.md)

This function is free to use.

Created 15th April 2019 , last changed 17th July 2022

  
[TextView.SetStyledText](TextViewSetStyledText.md) - [TextView.SetVisible](TextViewSetVisible.md)

[HTML Version](TextViewSetTag.shtml)