Search Unity

  1. Unity 2019.1 is now released.
    Dismiss Notice

Newbie needs help with IMGUI -> need to disable scrollbar in scrollview

Discussion in 'Extensions & OnGUI' started by cgklutts, Sep 14, 2018.

  1. cgklutts

    cgklutts

    Joined:
    Jun 3, 2014
    Posts:
    6
    using System.Collections;
    using System.Collections.Generic;
    using UnityEngine;
    public class Story : MonoBehaviour {
    public Vector2 scrollView;
    public GUIStyle textStyle;

    private void OnGUI()
    {
    scrollView = GUILayout.BeginScrollView(scrollView, false, false, GUILayout.Width(Screen.width), GUILayout.Height(Screen.height));
    GUILayout.TextArea("This is gonna be a whole lot of text. im just going to keep on typeing" +
    "untill this is full up that is what im going to do" +
    "kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk" +
    "This is gonna be a whole lot of text. im just going to keep on typeing" +
    "untill this is full up that is what im going to do" +
    "kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk" +
    "This is gonna be a whole lot of text. im just going to keep on typeing" +
    "untill this is full up that is what im going to do" +
    "kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk" +
    "This is gonna be a whole lot of text. im just going to keep on typeing" +
    "untill this is full up that is what im going to do" +
    "kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk" +
    "This is gonna be a whole lot of text. im just going to keep on typeing" +
    "untill this is full up that is what im going to do" +
    "kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk" +
    "kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk" +
    "kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk99");
    GUILayout.Button("Click me");
    GUILayout.Button("button");
    GUI.EndScrollView();
    }
    }