TextView.GetTop
---------------

Queries current position of the text view.

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

MBS( "TextView.GetTop"; TextView { ; swap } ) 

**MBS**( **"TextView.GetTop";** /\* Queries current position of the text view. \*/  
**$TextView**; /\* The reference number to the text view. \*/   
**$swap**) /\* Optional; 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 | Flags |
|---|---|---|---|
| TextView | The reference number to the text view. | $textview |  |
| swap | Whether to swap y coordinate. By default we swap them. Pass 0 to disable or 1 to swap. | 1 | Optional |

### Result

Returns y coordinate or error.

### Description

Queries current position of the text view.  
As Cocoa framework uses zero for the bottom coordinate, we have to swap for the normal topdown coordinates to be used.  
### See also

- [MapView.GetTop](MapViewGetTop.md)
- [TextView.GetLeft](TextViewGetLeft.md)
- [TextView.GetRTF](TextViewGetRTF.md)
- [TextView.GetTag](TextViewGetTag.md)
- [TextView.SetRTF](TextViewSetRTF.md)
- [TextView.SetTag](TextViewSetTag.md)

This function checks for a license.

Created 15th April 2019 , last changed 17th July 2022

  
[TextView.GetTag](TextViewGetTag.md) - [TextView.GetVisible](TextViewGetVisible.md)

[HTML Version](TextViewGetTop.shtml)