Window.SetToolbarStyle
----------------------

Sets toolbar style.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [Toolbar](component_Toolbar.md) [Window](component_Window.md) | [11.0](newinversion110.md) | ✅ Yes | ❌ No | ❌ No | ❌ No | ❌ No |

MBS( "Window.SetToolbarStyle"; WindowRef; Mode ) 

**MBS**( **"Window.SetToolbarStyle";** /\* Sets toolbar style. \*/  
**$WindowRef**; /\* Window Reference is the unique OS level window ID. You can obtain this by using the [Window.FindByTitle](WindowFindByTitle.md) or [Window.FindByIndex](WindowFindByIndex.md) functions. Pass zero to access the frontmost window.e.g. 0 \*/   
**$Mode**) /\* The new style.  
Value can be Automatic, Expanded, Preference, Unified or UnifiedCompact.e.g. "Automatic" \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| WindowRef | Window Reference is the unique OS level window ID. You can obtain this by using the [Window.FindByTitle](WindowFindByTitle.md) or [Window.FindByIndex](WindowFindByIndex.md) functions. Pass zero to access the frontmost window. | 0 |
| Mode | The new style.   Value can be Automatic, Expanded, Preference, Unified or UnifiedCompact. | "Automatic" |

### Result

Returns OK or error.

### Description

Sets toolbar style.  
The style that determines the appearance and location of the toolbar in relation to the title bar.  
Requires macOS 11.0 or newer.  
  
| Automatic | A style indicating that the system determines the toolbar’s appearance and location. |
|---|---|
| Expanded | A style indicating that the toolbar appears below the window title. |
| Preference | A style indicating that the toolbar appears below the window title with toolbar items centered in the toolbar. |
| Unified | A style indicating that the toolbar appears next to the window title. |
| UnifiedCompact | A style indicating that the toolbar appears next to the window title and with reduced margins to allow more focus on the window’s contents. |

### Examples

Set toolbar style:

 Set Variable \[ $r ; Value: MBS ( "Window.SetToolbarStyle"; 0 /\* current \*/; "expanded" ) \]  
### See also

- [Window.FindByIndex](WindowFindByIndex.md)
- [Window.FindByTitle](WindowFindByTitle.md)
- [Window.GetToolbarStyle](WindowGetToolbarStyle.md)
- [Window.GetToolbarVisible](WindowGetToolbarVisible.md)
- [Window.SetToolbarVisible](WindowSetToolbarVisible.md)

### Release notes

- **Version 11.0**
    - Added [Window.GetToolbarStyle](https://www.mbsplugins.eu/WindowGetToolbarStyle.shtml) and [Window.SetToolbarStyle](https://www.mbsplugins.eu/WindowSetToolbarStyle.shtml) for macOS 11.0

### Blog Entries

- [New in MBS FileMaker Plugin 11.0](https://www.mbsplugins.de/archive/2021-01-26/New_in_MBS_FileMaker_Plugin_11/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 10.6pr1](https://www.mbsplugins.de/archive/2020-12-02/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 29th November 2020 , last changed 5th September 2025

  
[Window.SetToolbarDisplayMode](WindowSetToolbarDisplayMode.md) - [Window.SetToolbarVisible](WindowSetToolbarVisible.md)

[HTML Version](WindowSetToolbarStyle.shtml)