Topics   All   MacOS (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server   Client   Old   Deprecated   Guides   Examples   Videos
New in version: 9.5   10.0   10.1   10.2   10.3   10.4   10.5   11.0   11.1   11.2    Statistic    FMM    Blog  

DragDrop.GetTop

Queries current position of the drop area.

Component Version macOS Windows Linux Server iOS SDK
DragDrop 4.0 ✅ Yes ✅ Yes ❌ No ❌ No ❌ No
MBS( "DragDrop.GetTop"; droparea; swap )   More

Parameters

Parameter Description Example
droparea The reference ID for this drop area. Use functions like DragDrop.CreateWithControl to create a 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"; $$dropview ) ]
Set Variable [ $y ; Value: MBS( "DragDrop.GetTop"; $$dropview ) ]
Show Custom Dialog [ "Current position" ; $x & " x " & $y ]

See also

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


DragDrop.GetText - DragDrop.GetTypes

Feedback: Report problem or ask question.