Window.GetWidth
---------------

Queries width of a window.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [Window](component_Window.md) | [2.8](newinversion28.md) | ✅ Yes | ✅ Yes | ❌ No | ❌ No | ❌ No |

MBS( "Window.GetWidth"; WindowRef ) 

**MBS**( **"Window.GetWidth";** /\* Queries width of 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 width of window.

### Description

Queries width of a window.  
### See also

- [Screen.Left](ScreenLeft.md)
- [Screen.Width](ScreenWidth.md)
- [Window.FindByIndex](WindowFindByIndex.md)
- [Window.FindByTitle](WindowFindByTitle.md)
- [Window.GetHeight](WindowGetHeight.md)
- [Window.GetLeft](WindowGetLeft.md)
- [Window.GetMinWidth](WindowGetMinWidth.md)
- [Window.GetTitle](WindowGetTitle.md)
- [Window.SetMaxWidth](WindowSetMaxWidth.md)
- [Window.SetMinWidth](WindowSetMinWidth.md)

### Example Databases

- [Mac and iOS/Machine Learning/Core ML Photos](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Mac%20and%20iOS/Machine%20Learning/Core%20ML%20Photos.shtml#9ScriptAnchor_)
- [RemoteControl/Windows List](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/RemoteControl/Windows%20List.shtml#1ScriptAnchor_)
- [Window/Window List](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Window/Window%20List.shtml#1ScriptAnchor_)
- [Window/Window Position and Size](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Window/Window%20Position%20and%20Size.shtml#1ScriptAnchor_)
- [Window/Window Scrollbar Position](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Window/Window%20Scrollbar%20Position.shtml#1299FieldAnchor_)

This function checks for a license.

Created 18th August 2014 , last changed 18th August 2014

  
[Window.GetTopMost](WindowGetTopMost.md) - [Window.GetWindowDisplayAffinity](WindowGetWindowDisplayAffinity.md)

[HTML Version](WindowGetWidth.shtml)