MenuItem.SetAttributedTitle
---------------------------

Applies a formatted text to the menu item.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [Menu](component_Menu.md) | [4.1](newinversion41.md) | ✅ Yes | ❌ No | ❌ No | ❌ No | ❌ No |

MBS( "MenuItem.SetAttributedTitle"; Item; Text ) 

**MBS**( **"MenuItem.SetAttributedTitle";** /\* Applies a formatted text to the menu item. \*/  
**$Item**; /\* The reference to the menu item. Please create one with [MenuItem.CreateMenuItem](MenuItemCreateMenuItem.md) or [MenuItem.CreateSeparator](MenuItemCreateSeparator.md). \*/   
**$Text**) /\* The text with styles. \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| Item | The reference to the menu item. Please create one with [MenuItem.CreateMenuItem](MenuItemCreateMenuItem.md) or [MenuItem.CreateSeparator](MenuItemCreateSeparator.md). | $item |
| Text | The text with styles. | $text |

### Result

Returns OK or error.

### Description

Applies a formatted text to the menu item.  
Supported styles are bold, italic, font name, font size, underline and colors.  
See also [MenuItem.GetAttributedTitle](MenuItemGetAttributedTitle.md).  
### See also

- [MenuItem.CreateMenuItem](MenuItemCreateMenuItem.md)
- [MenuItem.CreateSeparator](MenuItemCreateSeparator.md)
- [MenuItem.GetAttributedTitle](MenuItemGetAttributedTitle.md)

### Example Databases

- [Menu/Popup Menu](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Menu/Popup%20Menu.shtml#2ScriptAnchor_)

This function checks for a license.

Created 18th August 2014 , last changed 18th August 2014

  
[MenuItem.SetAlternate](MenuItemSetAlternate.md) - [MenuItem.SetBackColor](MenuItemSetBackColor.md)

[HTML Version](MenuItemSetAttributedTitle.shtml)