public void AddDrawBoxRow(params DrawBox[] drawBoxes) { if (drawBoxes.Length > Panel.GridSize.Width) { Debug.AddExceptionInClass(this.GetType(), "AddDrawBox", "Tried to more drawboxes to point row than can fit."); return; } for (int n = 0; n < Panel.GridSize.Width; n++) { if (n < drawBoxes.Length) { if (drawBoxes[n] != null) { drawBoxes[n].Width = Math.Max(RowWidths[n], drawBoxes[n].Width); } Panel.AddDrawBox(drawBoxes[n]); } else { Panel.AddDrawBox(null); } } }