有这么一个语句
Form2 test2 = new Form2(); //定义一个winform
//把winform加到Panel中
this.splitContainer1.Panel2.Controls.Add(test2); //设置winform的索引值
this.splitContainer1.Panel2.Controls.SetChildIndex(test2, 0);
为什么要设置索引值了?只能用 0,我用 1,2,3,4,可以吗?
Form2 test2 = new Form2(); //定义一个winform
//把winform加到Panel中
this.splitContainer1.Panel2.Controls.Add(test2); //设置winform的索引值
this.splitContainer1.Panel2.Controls.SetChildIndex(test2, 0);
为什么要设置索引值了?只能用 0,我用 1,2,3,4,可以吗?
就像在IDE里右键单击控件,里面有菜单:“置于顶层”、“置于底层”