DragDrop.SetDragImage
---------------------

Sets the image to use for dragging.

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

MBS( "DragDrop.SetDragImage"; droparea; Image ) 

**MBS**( **"DragDrop.SetDragImage";** /\* Sets the image to use for dragging. \*/  
**$droparea**; /\* The reference ID for this drop area.e.g. $dropHandle \*/   
**$Image**) /\* the image to use.   
For best results, pass a container value with a PNG image. \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| droparea | The reference ID for this drop area. | $dropHandle |
| Image | the image to use.    For best results, pass a container value with a PNG image. |  |

### Result

Returns OK or error.

### Description

Sets the image to use for dragging.  
This image represents the content of the drag operation.  
If none is set, we use the image shown in the container.  
  
On Windows the image is only shown if the underlaying software supports it. That means it won't show if over some of the FileMaker controls!  
### Examples

Set the drag image:

 Set Variable \[ $result ; Value: MBS ( "DragDrop.SetDragImage"; $$dropview ; DragTest::DragImage ) \]  
### See also

- [DragDrop.SetFrame](DragDropSetFrame.md)
- [DragDrop.SetImage](DragDropSetImage.md)

### Release notes

- **Version 11.0**
    - Added [DragDrop.GetFilePathsToDrag](https://www.mbsplugins.eu/DragDropGetFilePathsToDrag.shtml), [DragDrop.SetDragImage](https://www.mbsplugins.eu/DragDropSetDragImage.shtml) and [DragDrop.SetFilePathsToDrag](https://www.mbsplugins.eu/DragDropSetFilePathsToDrag.shtml) functions to allow drag from Drag &amp; Drop control..

### Example Databases

- [Drag and Drop/Better drag file from Container](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Drag%20and%20Drop/Better%20drag%20file%20from%20Container.shtml#2ScriptAnchor_)

### Blog Entries

- [New in MBS FileMaker Plugin 11.0](https://www.mbsplugins.de/archive/2021-01-26/New_in_MBS_FileMaker_Plugin_11/monkeybreadsoftware_blog_filemaker)
- [Neues MBS FileMaker Plugin 11.0](https://www.mbsplugins.de/archive/2021-01-19/Neues_MBS_FileMaker_Plugin_110/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin 11.0 - More than 6400 Functions In One Plugin](https://www.mbsplugins.de/archive/2021-01-19/MBS_FileMaker_Plugin_110_-_Mor/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 10.6pr4](https://www.mbsplugins.de/archive/2020-12-24/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)

This function is free to use.

Created 17th December 2020 , last changed 18th December 2020

  
[DragDrop.SetDragExitHandler](DragDropSetDragExitHandler.md) - [DragDrop.SetFilePathsToDrag](DragDropSetFilePathsToDrag.md)

[HTML Version](DragDropSetDragImage.shtml)