- Home /
Scroll in a long text GUILayout.TextArea
Hello, I'm going crazy, I can not find the solution .... I'm trying to make a telnet client to a MUD. I need a window containing the text I receive from Socket. I am using GuiLayout and TextArea:
GUIStyle aStyle = new GUIStyle();
aStyle.fontSize = _GUIFONTSIZE_;
aStyle.normal.textColor = Color.white;
aStyle.richText = true;
aStyle.font = PromptFont;
aStyle.wordWrap = false;
GUILayout.BeginArea(new Rect(0, 0, _GUIWIDTH_, (_GUIHEIGHT_-25)));
scrollPosition = GUILayout.BeginScrollView (
scrollPosition, false, true, GUILayout.Width (_GUIWIDTH_), GUILayout.Height(_GUIHEIGHT_-25));
GUILayout.Label (rcvBuff.ToString(), aStyle, GUILayout.ExpandHeight (true));
GUILayout.EndScrollView ();
GUILayout.EndArea();
It works ok but when the text is too long the scroll does not grow. What could it be?.
Comment
Your answer
Follow this Question
Related Questions
Unity Scrolling Textbox 2 Answers
GUIlayout scrollbar, Not working well... 1 Answer
How can I fix EditorGUILayout.TextArea not having word wrap? 1 Answer
TextArea tab width 0 Answers