TableLayoutPanel tlp = new TableLayoutPanel(); tlp.GrowStyle = TableLayoutPanelGrowStyle.AddRows; tlp.AutoSize = true; tlp.ColumnCount = 2; tlp.ColumnStyles.Add(new ColumnStyle()); tlp.ColumnStyles.Add(new ColumnStyle()); tlp.RowCount = 3;; tlp.RowStyles.Add(new RowStyle()); tlp.RowStyles.Add(new RowStyle()); tlp.RowStyles.Add(new RowStyle()); tlp.Controls.Add(new Panel(),0,0); tlp.Controls.Add(new Panel(),0,1); tlp.Controls.Add(new Panel(),1,0); tlp.Controls.Add(new Panel(),1,1); // code... // code... // etc... // Here's where I'm having the issue // when i create a new row and insert it // between two existing rows, the following // rows index does reflect that they now // have a new row location tlp.RowCount++; tlp.RowStyles.Insert(1, new RowStyle()); tlp.Controls.Add(new Panel(), 0, 1);
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)