ImageView.SetFrame
------------------

Sets a new frame for the image view.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [ImageView](component_ImageView.md) | [7.4](newinversion74.md) | ✅ Yes | ❌ No | ❌ No | ❌ No | ✅ Yes |

MBS( "ImageView.SetFrame"; ImageView; X; Y; Width; Height ) 

**MBS**( **"ImageView.SetFrame";** /\* Sets a new frame for the image view. \*/  
**$ImageView**; /\* The image view reference number.e.g. $$ImageView \*/   
**$X**; /\* The x coordinate. \*/   
**$Y**; /\* The y coordinate. \*/   
**$Width**; /\* The width of the control. \*/   
**$Height**) /\* The height of the control. \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| ImageView | The image view reference number. | $$ImageView |
| X | The x coordinate. |  |
| Y | The y coordinate. |  |
| Width | The width of the control. |  |
| Height | The height of the control. |  |

### Result

Returns OK or error.

### Description

Sets a new frame for the image view.  
As Cocoa framework uses zero for the bottom coordinate, we have to swap for the normal topdown coordinates to be used.  
### See also

- [ImageView.Release](ImageViewRelease.md)
- [ImageView.SetImage](ImageViewSetImage.md)
- [ImageView.SetTag](ImageViewSetTag.md)
- [MapView.SetFrame](MapViewSetFrame.md)
- [TextView.SetFrame](TextViewSetFrame.md)

### Release notes

- **Version 10.3**
    - Rewrote also [DragDrop.SetFrame](https://www.mbsplugins.eu/DragDropSetFrame.shtml), [ImageView.SetFrame](https://www.mbsplugins.eu/ImageViewSetFrame.shtml), [MapView.SetFrame](https://www.mbsplugins.eu/MapViewSetFrame.shtml) and [TextView.SetFrame](https://www.mbsplugins.eu/TextViewSetFrame.shtml).
    - Rewrote control placement for MacOS and iOS controls for [AVPlayer.SetFrameWithControl](https://www.mbsplugins.eu/AVPlayerSetFrameWithControl.shtml), [DragDrop.SetFrameWithControl](https://www.mbsplugins.eu/DragDropSetFrameWithControl.shtml), [ImageView.SetFrameWithControl](https://www.mbsplugins.eu/ImageViewSetFrameWithControl.shtml), [MapView.SetFrameWithControl](https://www.mbsplugins.eu/MapViewSetFrameWithControl.shtml) [TextView.SetFrameWithControl](https://www.mbsplugins.eu/TextViewSetFrameWithControl.shtml), [WebView.SetFrameWithControl](https://www.mbsplugins.eu/WebViewSetFrameWithControl.shtml).
- **Version 9.0**
    - Added [ImageView.SetFrameWithControl](http://www.mbsplugins.eu/ImageViewSetFrameWithControl.shtml) and [MapView.SetFrameWithControl](http://www.mbsplugins.eu/MapViewSetFrameWithControl.shtml) functions.

### Blog Entries

- [MBS FileMaker Plugin, version 10.3pr3](https://www.mbsplugins.de/archive/2020-06-12/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 14th September 2017 , last changed 14th September 2017

  
[ImageView.ReleaseAll](ImageViewReleaseAll.md) - [ImageView.SetFrameWithControl](ImageViewSetFrameWithControl.md)

[HTML Version](ImageViewSetFrame.shtml)