TouchBar.SetAutomaticCustomizeTouchBarMenuItemEnabled
-----------------------------------------------------

Sets whether customize menu is automatically enabled.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [TouchBar](component_TouchBar.md) | [6.5](newinversion65.md) | ✅ Yes | ❌ No | ❌ No | ❌ No | ❌ No |

MBS( "TouchBar.SetAutomaticCustomizeTouchBarMenuItemEnabled"; Setting ) 

**MBS**( **"TouchBar.SetAutomaticCustomizeTouchBarMenuItemEnabled";** /\* Sets whether customize menu is automatically enabled. \*/  
**$Setting**) /\* The new setting.  
Can be 1 to enable or 0 to disable.e.g. 1 \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| Setting | The new setting.   Can be 1 to enable or 0 to disable. | 1 |

### Result

Returns OK or error.

### Description

Sets whether customize menu is automatically enabled.  
Whether or not a menu item to customize the touch bar can be automatically added to the main menu. It will only actually be added when a touch bar hardware or simulator is present. Defaults to 0. Setting this property to 1 is the recommended way to add the customization menu item.   
But if non-standard placement of the menu item is needed, creating a menu item with an action of toggleTouchBarCustomizationPalette can be used instead.  
  
Causes FileMaker 19 to crash on menu rebuild!  
### Examples

Enable menu command:

 If \[MBS ( "[TouchBar.Available](TouchBarAvailable.md)" )\]  
 Set Variable \[$r ; Value:MBS ( "TouchBar.SetAutomaticCustomizeTouchBarMenuItemEnabled"; 1 )\]  
End If  
Disable it:

 Set Variable \[ $r ; Value: MBS ( "TouchBar.SetAutomaticCustomizeTouchBarMenuItemEnabled"; 0 ) \]  
### See also

- [TouchBar.Available](TouchBarAvailable.md)
- [TouchBar.GetAutomaticCustomizeTouchBarMenuItemEnabled](TouchBarGetAutomaticCustomizeTouchBarMenuItemEnabled.md)

This function is free to use.

Created 1st November 2016 , last changed 5th July 2021

  
[TouchBar.ReleaseAll](TouchBarReleaseAll.md) - [TouchBar.SetCustomizationAllowedItemIdentifiers](TouchBarSetCustomizationAllowedItemIdentifiers.md)

[HTML Version](TouchBarSetAutomaticCustomizeTouchBarMenuItemEnabled.shtml)