希望:切换到
dockingtabpage1的时候,执行radiobutton10
dockingtabpage2的时候,执行radiobutton20
dockingtabpage3的时候,执行radiobutton30
- private void c1DockingTab1_SelectedIndexChanged(object sender, EventArgs e)
- {
- radioButton10.Checked = true;
- radioButton10_CheckedChanged(radioButton10, null);
- radioButton20.Checked = true;
- radioButton20_CheckedChanged(radioButton20, null);
- radioButton30.Checked = true;
- radioButton30_CheckedChanged(radioButton30, null);
- }
复制代码
这样写的话,当发生切换时,radiobutton10,radiobutton20,radiobutton30都要执行一遍
希望切换到哪页,哪页的radiobutton就自动执行,而不是所有都执行 |