DragDrop.GetTop
---------------

Queries current position of the drop area.

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

MBS( "DragDrop.GetTop"; droparea; swap ) 

**MBS**( **"DragDrop.GetTop";** /\* Queries current position of the drop area. \*/  
**$droparea**; /\* The reference ID for this drop area.e.g. $dropHandle \*/   
**$swap**) /\* Whether to swap y coordinate. By default we swap them. Pass 0 to disable or 1 to swap.e.g. 1 \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| droparea | The reference ID for this drop area. | $dropHandle |
| swap | Whether to swap y coordinate. By default we swap them. Pass 0 to disable or 1 to swap. | 1 |

### Result

Returns y coordinate or error.

### Description

Queries current position of the drop area.  
As Cocoa framework uses zero for the bottom coordinate, we have to swap for the normal topdown coordinates to be used.  
### Examples

"Query current positon:"

 Set Variable \[ $x ; Value: MBS ( "[DragDrop.GetLeft](DragDropGetLeft.md)"; $$dropview ) \]   
Set Variable \[ $y ; Value: MBS ( "DragDrop.GetTop"; $$dropview ) \]   
Show Custom Dialog \[ "Current position" ; $x &amp; " x " &amp; $y \]  
### See also

- [DragDrop.GetHTML](DragDropGetHTML.md)
- [DragDrop.GetLeft](DragDropGetLeft.md)
- [DragDrop.GetPath](DragDropGetPath.md)
- [DragDrop.GetRTF](DragDropGetRTF.md)
- [DragDrop.GetSVG](DragDropGetSVG.md)
- [DragDrop.GetTag](DragDropGetTag.md)
- [DragDrop.GetText](DragDropGetText.md)
- [DragDrop.GetTypes](DragDropGetTypes.md)
- [DragDrop.GetURL](DragDropGetURL.md)
- [DragDrop.SetTag](DragDropSetTag.md)

This function checks for a license.

Created 18th August 2014 , last changed 18th December 2020

  
[DragDrop.GetText](DragDropGetText.md) - [DragDrop.GetTypes](DragDropGetTypes.md)

[HTML Version](DragDropGetTop.shtml)