Components All New MacOS Windows Linux iOS
Examples Mac & Win Server Client Guides Statistic FMM Blog Deprecated Old

Window.SetToolbarStyle

Sets toolbar style.

Component Version macOS Windows Linux Server iOS SDK
Toolbar Window 11.0 ✅ Yes ❌ No ❌ No ❌ No ❌ No
MBS( "Window.SetToolbarStyle"; WindowRef; Mode )   More

Parameters

Parameter Description Example
WindowRef Window Reference is the unique OS level window ID. You can obtain this by using the Window.FindByTitle or Window.FindByIndex 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.

AutomaticA style indicating that the system determines the toolbar’s appearance and location.
ExpandedA style indicating that the toolbar appears below the window title.
PreferenceA style indicating that the toolbar appears below the window title with toolbar items centered in the toolbar.
UnifiedA style indicating that the toolbar appears next to the window title.
UnifiedCompactA 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 stlye:

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

See also

Release notes

Blog Entries

This function checks for a license.

Created 29th November 2020, last changed 13th May 2021


Window.SetToolbarDisplayMode - Window.SetToolbarVisible