GUI controls inside a window are disabled for unknown reason

Hello,

My GUI controls are all disabled once I put them into my GUI window. Slider bar cannot slide, text field can not edit. If I copy the GUI control codes from inside the window to outside the window directly under the OnGUI(), every thing works again. Here is my code. Anyone knows the reason for this? Thanks in advance.

 void OnGUI() {
		GUI.skin = menuSkin;
		windowRect = GUI.Window(0, windowRect,myWindow, "Menu", GUI.skin.GetStyle("Window"));
		
	}
	
	void myWindow(int windowID){
//		GUI.DragWindow();
		
				GUI.Box (box1, "Ambient Light");
		GUI.Label(intensityRect, "Intensity");
		mySlider = GUI.HorizontalSlider(IntensitySlider, mySlider,0.4f, 1.0f);

		GUI.Box (box2, "Location Selection");
		GUI.Button(buttonRoof, "Roof");
		GUI.Button(buttonMecha, "Mechanical Room");
		
		GUI.Box (box3, "Sun Track");
		
		GUI.Label(azimuthLabel, "Azimuth");
		azimuth = GUI.TextField(azimuthField, azimuth);

		
		GUI.Label(altitudeLabel, "Altitude");
		altitude = GUI.TextField(altitudeField, altitude);	
	}

The controls you use inside the Window Function are relative to the window itself. You might have positions or other variables set up to work in screen coordinates that don’t make sense when they’re relative to the window you’re drawing them in.