DragDrop.SetAutoResizingMask
----------------------------

Sets the auto resizing mask.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [DragDrop](component_DragDrop.md) | [9.1](newinversion91.md) | ✅ Yes | ❌ No | ❌ No | ❌ No | ❌ No |

MBS( "DragDrop.SetAutoResizingMask"; droparea; Value ) 

**MBS**( **"DragDrop.SetAutoResizingMask";** /\* Sets the auto resizing mask. \*/  
**$droparea**; /\* The reference ID for this drop area.e.g. $dropHandle \*/   
**$Value**) /\* The new setting.e.g. 4+8 \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| droparea | The reference ID for this drop area. | $dropHandle |
| Value | The new setting. | 4+8 |

### Result

Returns OK or error.

### Description

Sets the auto resizing mask.  
This defines whether view changes its size based on the surrounding window.  
  
| Name | Value | Description |
|---|---|---|
| NotSizable | 0 | The view cannot be resized. |
| MinXMargin | 1 | The left margin between the view and its superview is flexible. |
| WidthSizable | 2 | The view’s width is flexible. |
| MaxXMargin | 4 | The right margin between the view and its superview is flexible. |
| MinYMargin | 8 | The bottom margin between the view and its superview is flexible. |
| HeightSizable | 16 | The view’s height is flexible. |
| MaxYMargin | 32 | The top margin between the view and its superview is flexible. |

  
e.g. the value 18 means the view can resize both horizontally and vertically with the parent view (window).  
  
Due to changes in FileMaker 21, the auto resize feature stopped working.  
### Examples

Resize with window growing:

 MBS ( "DragDrop.SetAutoResizingMask"; $$dragDrop ; 4+2+8+16 )  
Set autoresize, so the control stays where it is:

 Set Variable \[ $r ; Value: MBS ( "DragDrop.SetAutoResizingMask"; $$Player ; 4+8 ) \]  
### See also

- [AVPlayer.SetAutoResizingMask](AVPlayerSetAutoResizingMask.md)
- [DragDrop.GetAutoResizingMask](DragDropGetAutoResizingMask.md)
- [MapView.GetAutoResizingMask](MapViewGetAutoResizingMask.md)
- [MapView.SetAutoResizingMask](MapViewSetAutoResizingMask.md)
- [Preview.GetAutoResizingMask](PreviewGetAutoResizingMask.md)
- [Preview.SetAutoResizingMask](PreviewSetAutoResizingMask.md)
- [TextView.SetAutoResizingMask](TextViewSetAutoResizingMask.md)
- [WebView.SetAutoResizingMask](WebViewSetAutoResizingMask.md)

### Release notes

- **Version 9.1**
    - Added [DragDrop.GetAutoResizingMask](http://www.mbsplugins.eu/DragDropGetAutoResizingMask.shtml) and [DragDrop.SetAutoResizingMask](http://www.mbsplugins.eu/DragDropSetAutoResizingMask.shtml) functions.

### Blog Entries

- [MBS FileMaker Plugin, version 9.1pr4](https://www.mbsplugins.de/archive/2019-02-25/MBS_FileMaker_Plugin_version_9/monkeybreadsoftware_blog_filemaker)

This function is free to use.

Created 20th February 2019 , last changed 17th October 2024

  
[DragDrop.ReleaseAll](DragDropReleaseAll.md) - [DragDrop.SetCursor](DragDropSetCursor.md)

[HTML Version](DragDropSetAutoResizingMask.shtml)