Window.ClearTouchBar
--------------------

Clears a TouchBar assigned to a window.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [Window](component_Window.md) [TouchBar](component_TouchBar.md) | [8.4](newinversion84.md) | ✅ Yes | ❌ No | ❌ No | ❌ No | ❌ No |

MBS( "Window.ClearTouchBar"; WindowRef ) 

**MBS**( **"Window.ClearTouchBar";** /\* Clears a TouchBar assigned to a window. \*/  
**$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 \*/ 

### 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 |

### Result

Returns OK or error.

### Description

Clears a TouchBar assigned to a window.  
You assign the TouchBar with [TouchBar.AssignToWindow](TouchBarAssignToWindow.md) function.  
### Examples

Clear touch bar for front window:

 MBS ( "Window.ClearTouchBar"; 0 )  
### See also

- [TouchBar.AssignToWindow](TouchBarAssignToWindow.md)
- [Window.FindByIndex](WindowFindByIndex.md)
- [Window.FindByTitle](WindowFindByTitle.md)

### Release notes

- **Version 8.4**
    - Added [Window.ClearTouchBar](http://www.mbsplugins.eu/WindowClearTouchBar.shtml) and [App.ClearTouchBar](http://www.mbsplugins.eu/AppClearTouchBar.shtml) fucntions.

### Blog Entries

- [MBS FileMaker Plugin, version 8.4pr2](https://www.mbsplugins.de/archive/2018-08-10/MBS_FileMaker_Plugin_version_8/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 8th August 2018 , last changed 10th April 2022

  
[Window.ClearFocus](WindowClearFocus.md) - [Window.ConfigureToolbarMenu](WindowConfigureToolbarMenu.md)

[HTML Version](WindowClearTouchBar.shtml)