GUILayout.MaxHeight not constraining Window

I am trying to set up a simple GUILayout.Window with a constrained height using GUILayou.MaxHeight, in Unity iPhone. The window is not behaving well…

Here is the code… Any ideas?

/////////////////////////////////////////

var windowRect = Rect(20,20,120,50);

function OnGUI () {
	windowRect = GUILayout.Window(0, windowRect, DoMyWindow, "My Window", GUILayout.MaxHeight(50));
}

function DoMyWindow (windowID : int) {
	
	if (GUILayout.Button ("Hi there big boy"))
		Debug.Log ("I hit the button");
			
	if (GUILayout.Button ("Hi there big boy"))
		Debug.Log ("I hit the button");
			
	if (GUILayout.Button ("Hi there big boy"))
		Debug.Log ("I hit the button");
			
	if (GUILayout.Button ("Hi there big boy"))
		Debug.Log ("I hit the button");
			
	if (GUILayout.Button ("Hi there big boy"))
		Debug.Log ("I hit the button");
			
	if (GUILayout.Button ("Hi there big boy"))
	Debug.Log ("I hit the button");			
		
}

What exactly do you mean when you say the window isn’t behaving well? Can you give any more detail?

Andee,
Thanks for following up. The window is growing past the constrained height value.