inventory script array lines?

i hit a wall! xD again -.-
well i got 2 scripts atm. item.cs and inventory.cs
i want the script to make 4 buttons, then a new line, 4 buttons new line and so forth. how do i do that?
here is what i got this far:

ITEM

public bool isEquipped = false;
public int itemId;
public int buyPrice;
public int sellPrice;
public GameObject itemVisual;
public Texture2D icon;

// Use this for initialization
void Start () {

}

// Update is called once per frame
void Update () {
	
	//shows and hides item when equipped and unequipped
	//if (isEquipped == true){
	//	itemVisual.renderer.enabled = true;
	//}
	//else itemVisual.renderer.enabled = false;
	///////////////////////////////////////////////////

}
public void isEquippedCheck (){
	
	if (isEquipped == true){
	itemVisual.renderer.enabled = true;
	}
	else itemVisual.renderer.enabled = false;
}

}

inventory script here.

public GameObject[] itemSlots = new GameObject[10];
public int i = 0;

// Use this for initialization
void Start () {

}

// Update is called once per frame
void Update () {

}

void OnGUI () {
	Rect r = new Rect(0,0,35,35); // this is the Rect variable
	for (i = 0; i < itemSlots.Length; i++){
                if (GUI.Button(r,itemSlots*.GetComponentInChildren<item>().icon)){*
  •   	}*
    
  • }*

}
}

GUILayout.BeginArea( /* Rect in which the buttons will appear / );
GUILayout.BeginVertical();
for ( int row = 0; row < rowMax; row++ ) {
GUILayout.BeginHorizontal();
for ( int button = 0; button < buttonMax; button++ ) {
GUILayout.Button( /
whatever goes here */ );
}
GUILayout.EndHorizontal();
}
GUILayout.EndVertical();
GUILayout.EndArea();

Note that I like to treat .Begin and .End as curlies for indentation purposes, makes it easy to see when I miss something.

Edit: Oops, edited to C#-style.