# How To Use Vertical Scroller

**URL:** https://discussions.unity.com/t/how-to-use-vertical-scroller/426626
**Category:** UI
**Tags:** IMGUI
**Created:** [October 25, 2010, 9:06pm UTC](https://discussions.unity.com/t/how-to-use-vertical-scroller/426626 "2010-10-25T21:06:29Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![TheCowMan](https://dub1.discourse-cdn.com/unity/user_avatar/discussions.unity.com/thecowman/32/551365_2.png) [@TheCowMan](https://discussions.unity.com/u/TheCowMan)
#### Post date: [October 25, 2010, 9:06pm UTC](https://discussions.unity.com/t/how-to-use-vertical-scroller/426626/1 "2010-10-25T21:06:29Z")

</div>

How do i make a scroll box with a bunch of buttons inside it? The example on the documentation doesn’t clear up how to put buttons in one. If you dont know what i’m talking about, heres the link. Scroll down the page to see it.

[http://unity3d.com/support/documentation/Components/gui-Controls.html](http://unity3d.com/support/documentation/Components/gui-Controls.html)

This is my code so far

```auto
function OnGUI () {
	// Begin the ScrollView
	scrollViewVector = GUI.BeginScrollView (Rect (25, 25, 100, 100), scrollViewVector, Rect (0, 0, 400, 400));

	// End the ScrollView
	GUI.EndScrollView();
}

```

---

<div class="post-metadata">

### Author: ![anon\_76975066](https://avatars.discourse-cdn.com/v4/letter/a/6a8cbe/32.png) [@anon\_76975066](https://discussions.unity.com/u/anon_76975066)
#### Post date: [October 26, 2010, 12:39am UTC](https://discussions.unity.com/t/how-to-use-vertical-scroller/426626/2 "2010-10-26T00:39:53Z")

</div>

I haven’t been scripting long( about three hours training) but i think that the scripting wiki on this site has a section that explains how to create complex GUIs like scrollbars with text and color controls, stuff like that

---

<div class="post-metadata">

### Author: ![anon\_43237147](https://avatars.discourse-cdn.com/v4/letter/a/3bc359/32.png) [@anon\_43237147](https://discussions.unity.com/u/anon_43237147)
#### Post date: [October 26, 2010, 11:38am UTC](https://discussions.unity.com/t/how-to-use-vertical-scroller/426626/3 "2010-10-26T11:38:22Z")

</div>

@heartfornairobi: yes, there is; it’s a page or so on in the manual from the one TheCowMan linked.

@TheCowMan: look again at the example you referenced; it shows you exactly what to do. The example puts a TextArea inside the ScrollView; to put a button (or several buttons) just use GUI.Button instead of GUI.TextArea. Whatever you draw in between BeginScrollView() and EndScrollView() will be part of (inside) the scroll view.

---

<div class="post-metadata">

### Author: ![juicymangoz](https://avatars.discourse-cdn.com/v4/letter/j/3da27b/32.png) [@juicymangoz](https://discussions.unity.com/u/juicymangoz)
#### Post date: [February 14, 2012, 12:19am UTC](https://discussions.unity.com/t/how-to-use-vertical-scroller/426626/4 "2012-02-14T00:19:36Z")

</div>

> [@anon\_43237147](#):
>
> @heartfornairobi: yes, there is; it’s a page or so on in the manual from the one TheCowMan linked.
> 
> @TheCowMan: look again at the example you referenced; it shows you exactly what to do. The example puts a TextArea inside the ScrollView; to put a button (or several buttons) just use GUI.Button instead of GUI.TextArea. Whatever you draw in between BeginScrollView() and EndScrollView() will be part of (inside) the scroll view.

What if you want to put Game Objects inside the box? How does one do that? I don’t use GUI buttons for memory reasons. But the objects i want inside that can scroll are objects the player can equip. Any ideas? Thanks.
