TextView.SetFrameWithControl
----------------------------

Repositions text view to given control.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [TextView](component_TextView.md) | [9.2](newinversion92.md) | ✅ Yes | ✅ Yes | ❌ No | ❌ No | ✅ Yes |

MBS( "TextView.SetFrameWithControl"; TextView; ControlName { ; DX; DY } ) 

**MBS**( **"TextView.SetFrameWithControl";** /\* Repositions text view to given control. \*/  
**$TextView**; /\* The reference number to the text view. \*/   
**$ControlName**; /\* The name of the control on your FileMaker form.   
e.g. you can place a rectangle there to define the position.e.g. "mymedia" \*/   
**$DX**; /\* Optional; A delta to move view more to left or right.e.g. 0 \*/   
**$DY**) /\* Optional; A delta to move view more to top or bottom.e.g. 0 \*/ 

### Parameters

| Parameter | Description | Example | Flags |
|---|---|---|---|
| TextView | The reference number to the text view. | $textview |  |
| ControlName | The name of the control on your FileMaker form.    e.g. you can place a rectangle there to define the position. | "mymedia" |  |
| DX | A delta to move view more to left or right. | 0 | Optional |
| DY | A delta to move view more to top or bottom. | 0 | Optional |

### Result

Returns OK or error.

### Description

Repositions text view to given control.  
If you moved control in layout mode, this can move the text view back to the new position.  
Also useful to switch between different locations on the layout.  
### See also

- [AVPlayer.SetFrameWithControl](AVPlayerSetFrameWithControl.md)
- [DragDrop.SetFrameWithControl](DragDropSetFrameWithControl.md)
- [ImageView.SetFrameWithControl](ImageViewSetFrameWithControl.md)
- [MapView.SetFrameWithControl](MapViewSetFrameWithControl.md)
- [Overlay.SetFrameWithControl](OverlaySetFrameWithControl.md)
- [Preview.SetFrameWithControl](PreviewSetFrameWithControl.md)
- [TextView.CreateWithControl](TextViewCreateWithControl.md)
- [WebView.SetFrameWithControl](WebViewSetFrameWithControl.md)

### Release notes

- **Version 10.3**
    - 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 10.0**
    - Changed [DragDrop.CreateWithControl](https://www.mbsplugins.eu/DragDropCreateWithControl.shtml), [DragDrop.CreateOnPopoverWithControl](https://www.mbsplugins.eu/DragDropCreateOnPopoverWithControl.shtml), [TextView.CreateWithControl](https://www.mbsplugins.eu/TextViewCreateWithControl.shtml), [TextView.SetFrameWithControl](https://www.mbsplugins.eu/TextViewSetFrameWithControl.shtml) and [TextView.CreateOnPopoverWithControl](https://www.mbsplugins.eu/TextViewCreateOnPopoverWithControl.shtml) to return error when control is not found.

### Blog Entries

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

This function is free to use.

Created 15th April 2019 , last changed 9th June 2020

  
[TextView.SetFrame](TextViewSetFrame.md) - [TextView.SetHTMLText](TextViewSetHTMLText.md)

[HTML Version](TextViewSetFrameWithControl.shtml)