public void AddRows(IList <Control> cnts) { m_List.AddRange(cnts); for (int i = 0; i < cnts.Count - 1; i++) { var cnt = cnts[i]; m_Active.Panel1.Controls.Add(cnt); m_Active.Panel2.Controls.Add((i + 1 < cnts.Count - 1) ? m_Active = new TablePanelControl() : cnts[i + 1]); } }
public TablePanelControl() { m_Active = this; Dock = DockStyle.Fill; Orientation = Orientation.Horizontal; }