MenuItem.SetAlternate
---------------------

Marks the receiver as an alternate to the previous 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.SetAlternate"; Item; Value ) 

**MBS**( **"MenuItem.SetAlternate";** /\* Marks the receiver as an alternate to the previous menu item. \*/  
**$Item**; /\* The reference to the menu item. Please create one with [MenuItem.CreateMenuItem](MenuItemCreateMenuItem.md) or [MenuItem.CreateSeparator](MenuItemCreateSeparator.md). \*/   
**$Value**) /\* 1 if the receiver is an alternate to the previous menu item, 0 otherwise.e.g. 1 \*/ 

### 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 |
| Value | 1 if the receiver is an alternate to the previous menu item, 0 otherwise. | 1 |

### Result

Returns OK or error.

### Description

Marks the receiver as an alternate to the previous menu item.  
If the receiver has the same key equivalent as the previous item, but has different key equivalent modifiers, the items are folded into a single visible item and the appropriate item shows while tracking the menu, depending on what modifier key (if any) is pressed. The menu items may also have no key equivalent as long as the key equivalent modifiers are different.  
See also [MenuItem.GetAlternate](MenuItemGetAlternate.md).  
### See also

- [MenuItem.CreateMenuItem](MenuItemCreateMenuItem.md)
- [MenuItem.CreateSeparator](MenuItemCreateSeparator.md)
- [MenuItem.GetAlternate](MenuItemGetAlternate.md)
- [MenuItem.SetState](MenuItemSetState.md)
- [MenuItem.SetUnderline](MenuItemSetUnderline.md)

This function checks for a license.

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

  
[MenuItem.ReleaseAll](MenuItemReleaseAll.md) - [MenuItem.SetAttributedTitle](MenuItemSetAttributedTitle.md)

[HTML Version](MenuItemSetAlternate.shtml)