GUIStyle.stretchHeight Manual     Reference     Scripting  
Scripting > Runtime Classes > GUIStyle
GUIStyle.stretchHeight

var stretchHeight : boolean

Description

Can GUI elements of this style be stretched vertically for better layouting?

JavaScript
function OnGUI() {
if(GUI.skin.customStyles.Length > 0)
GUI.skin.customStyles[0].stretchHeight = true;
}

using UnityEngine;
using System.Collections;

public class example : MonoBehaviour {
void OnGUI() {
if (GUI.skin.customStyles.Length > 0)
GUI.skin.customStyles[0].stretchHeight = true;

}
}

import UnityEngine
import System.Collections

class example(MonoBehaviour):

def OnGUI():
if GUI.skin.customStyles.Length > 0:
GUI.skin.customStyles[0].stretchHeight = true