GUI.Box doesn't show when GUI.Button is clicked

Hey! This is kind of a beginner’s question, but I can’t seem to make this work and I’m getting kind of frustrated.
I have a tools box which contains two buttons, and I’d like that each time the player clicks one of those buttons, a GUI.Box will be drawn in the screen with some info.

This is the code I have:

// C#
private void OnGUI() {
...

if (GUI.Button(addGroupRect, "+Group")) {
    Debug.Log("+Group");
    GUI.Box(new Rect(20, topPanHeight + 20, 100, 30), "Box1");
    }
if (GUI.Button(addElemRect, "+Elem")) {
   	Debug.Log("+Elem");
   	GUI.Button(new Rect(40, topPanHeight + 20, 100, 30), "Elem");
}

Any ideas on why nothing new is drawn when the buttons are clicked?

Thanks in advance,

Valter

With your code, the GUI.Box is drawn only the instant (if…) the button is pressed. You should set a boolean variable that tells if the box needs to be drawn or not, and change that when a button is pressed.

maybe you can adjust you GUI Depth. for more information, you can see in this site

http://docs.unity3d.com/Documentation/ScriptReference/GUI-depth.html

maybe it can help you…