MenuItem.SetSelectable
----------------------

Sets whether menu item is selectable.

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

### Deprecated

This function was [deprecated](deprecated.md). Use [MenuItem.SetEnabled](MenuItemSetEnabled.md) instead.

MBS( "MenuItem.SetSelectable"; Item; Value ) 

**MBS**( **"MenuItem.SetSelectable";** /\* Sets whether menu item is selectable. \*/  
**$Item**; /\* The reference to the menu item. Please create one with [MenuItem.CreateMenuItem](MenuItemCreateMenuItem.md) or [MenuItem.CreateSeparator](MenuItemCreateSeparator.md). \*/   
**$Value**) /\* The new setting.  
Pass 1 to make menu item selectable or 0 to disable selection.e.g. 0 \*/ 

### 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 | The new setting.   Pass 1 to make menu item selectable or 0 to disable selection. | 0 |

### Result

Returns OK or error.

### Description

Sets whether menu item is selectable.  
By default on Mac you can select submenu's parent menu item. This function can be used to disable this behavior.  
For the plugin all menu items are created selectable = true by default.  
  
Currently this flag has no effect on Windows.  
### Examples

Disable selecting menuitem:

 MBS ("MenuItem.SetSelectable"; $item ; 0)  
### See also

- [MenuItem.CreateMenuItem](MenuItemCreateMenuItem.md)
- [MenuItem.CreateSeparator](MenuItemCreateSeparator.md)
- [MenuItem.GetSelectable](MenuItemGetSelectable.md)

### Release notes

- **Version 12.0**
    - Deprecated [MenuItem.GetSelectable](https://www.mbsplugins.eu/MenuItemGetSelectable.shtml) and [MenuItem.SetSelectable](https://www.mbsplugins.eu/MenuItemSetSelectable.shtml) since they don't work properly anymore on current macOS versions.

### Blog Entries

- [MBS FileMaker Plugin, version 11.6pr4](https://www.mbsplugins.de/archive/2021-12-22/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin 6.3 for OS X/Windows](https://www.mbsplugins.de/archive/2016-07-12/MBS_FileMaker_Plugin_63_for_OS/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 6.3pr3](https://www.mbsplugins.de/archive/2016-06-19/MBS_FileMaker_Plugin_version_6/monkeybreadsoftware_blog_filemaker)

### FileMaker Magazin

- [Ausgabe 2/2021, Seite 29](https://filemaker-magazin.de/neuigkeit/4132-Appetithappen-FMM_202102)

This function is free to use.

Created 17th June 2016 , last changed 19th December 2021

  
[MenuItem.SetScriptAction](MenuItemSetScriptAction.md) - [MenuItem.SetState](MenuItemSetState.md)

[HTML Version](MenuItemSetSelectable.shtml)