[英]RadioButton Reset
I'm trying to create a reset button that resets a textbox and label to "". 我正在尝试创建一个重置按钮,以将文本框和标签重置为“”。 Which I have done successfully, the next step is having the radio button being unchecked when the reset button is clicked.
我已成功完成此操作,下一步是单击“重置”按钮时取消选中单选按钮。
private void btnReset_Click(object sender, EventArgs e)
{
txtTemp.Text = "";
lblDisplay.Text = "";
rbn1.AutoCheck = false;
}
So basically to further clarify my problem, I have two radio buttons and when the reset button is clicked i want both of the buttons to be unselected. 因此,基本上为了进一步阐明我的问题,我有两个单选按钮,当单击“重置”按钮时,我希望两个按钮都未被选中。
rbn1.Checked = false;
rbn2.Checked = false;
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.