Window.SetMaxHeight
-------------------

Sets maximum allowed height for the window.

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

MBS( "Window.SetMaxHeight"; WindowRef; Value ) 

**MBS**( **"Window.SetMaxHeight";** /\* Sets maximum allowed height for the 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 \*/   
**$Value**) /\* The new value.e.g. 500 \*/ 

### 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 |
| Value | The new value. | 500 |

### Result

Returns OK or error.

### Description

Sets maximum allowed height for the window.  
The maximum/minimum window sizes define how much a window can be resized by the user.  
Those limits may have no impact on what [Window.Resize](WindowResize.md) can do.  
### Examples

Set maximum height to 800 point:

 MBS ( "Window.SetMaxHeight"; Get(WindowName); 800 )  
### See also

- [Window.FindByIndex](WindowFindByIndex.md)
- [Window.FindByTitle](WindowFindByTitle.md)
- [Window.GetHeight](WindowGetHeight.md)
- [Window.GetMaxHeight](WindowGetMaxHeight.md)
- [Window.GetMaxWidth](WindowGetMaxWidth.md)
- [Window.GetMinHeight](WindowGetMinHeight.md)
- [Window.Resize](WindowResize.md)
- [Window.SetMaxWidth](WindowSetMaxWidth.md)
- [Window.SetMinHeight](WindowSetMinHeight.md)

This function checks for a license.

Created 11st December 2016 , last changed 11st December 2016

  
[Window.SetIgnoresMouseEvents](WindowSetIgnoresMouseEvents.md) - [Window.SetMaxWidth](WindowSetMaxWidth.md)

[HTML Version](WindowSetMaxHeight.shtml)