# EndScrollView()

> Ends a scrollview started with a call to BeginScrollView.

## Definition

* **Type:** Method
* **Namespace:** [UnityEditor](/engine/6000.0/script-reference/unityeditor.md)
* **Assembly:** UnityEditor

```csharp
public static void EndScrollView()
```

### Remarks

![BeginEndScrollView (EndScrollView())](/api/media?file=/engine/6000.0/media/images/BeginEndScrollView.png)

*Label inside a scroll view.*

### Examples

```csharp
using UnityEngine;
using UnityEditor;

// Simple Editor Window that creates a scroll view with a Label inside

public class CreateEndScrollViewCS : EditorWindow
{
    Vector2 scrollPos;
    string t = "This is a string inside a Scroll view!";

    [MenuItem("Examples/Write text on ScrollView")]
    static void Init()
    {
        EditorWindow window = GetWindow(typeof(CreateEndScrollViewCS));
        window.Show();
    }

    void OnGUI()
    {
        EditorGUILayout.BeginHorizontal();
        scrollPos =
            EditorGUILayout.BeginScrollView(scrollPos, GUILayout.Width(100), GUILayout.Height(100));
        GUILayout.Label(t);
        EditorGUILayout.EndScrollView();
        if (GUILayout.Button("Add More Text", GUILayout.Width(100), GUILayout.Height(100)))
            t += " \nAnd this is more text!";
        EditorGUILayout.EndHorizontal();
        if (GUILayout.Button("Clear"))
            t = "";
    }
}
```
