请教:TableLayoutPanel.Controls.Add中的下一个可行的单元位置(.net2.0,C#)
由于在新手区没有观众给意见,希望到精华区能找到帮助。谢谢。 运行环境:.net 2.0 AddAButtonIntoTable: private void button1_Click(object sender, EventArgs e) { Button b = new Button(); b.Text = "new button" + (++index).ToString(); tableLayoutPanel1.Controls.Add(b, (int)nColumn.Value, (int)nRow.Value); } int index = 0; 测试项目文件: /Files/zzj8704/TableLayoutTest.zip 初始状态: 问题:单击6次,出现如下结果,那位请解释为何结果如下.谢谢。 参考: TableLayoutPanel1.Controls.Add(aButton,3,3); Columns in a TableLayoutPanel are numbers starting at 1, while rows start at 0. Thus the example shown above adds aButton to the cell in column 3 at row 3, which is actually the fourth