GUILayout.ExpandWidth Manual     Reference     Scripting  
Scripting > Runtime Classes > GUILayout
GUILayout.ExpandWidth

static function ExpandWidth (expand : bool) : GUILayoutOption

Description

Option passed to a control to allow or disallow horizontal expansion.

JavaScripts
function OnGUI () {
GUILayout.BeginVertical();
GUILayout.Button("Short Button", GUILayout.ExpandWidth(false));
GUILayout.Button("Very very long Button");
GUILayout.EndVertical();
}

using UnityEngine;
using System.Collections;

public class example : MonoBehaviour {
void OnGUI() {
GUILayout.BeginVertical();
GUILayout.Button("Short Button", GUILayout.ExpandWidth(false));
GUILayout.Button("Very very long Button");
GUILayout.EndVertical();
}
}

import UnityEngine
import System.Collections

class example(MonoBehaviour):

def OnGUI():
GUILayout.BeginVertical()
GUILayout.Button('Short Button', GUILayout.ExpandWidth(false))
GUILayout.Button('Very very long Button')
GUILayout.EndVertical()