使用Clear Button如何取消选中单选按钮 [英] using Clear Button how to uncheck the radio button

查看:228
本文介绍了使用Clear Button如何取消选中单选按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个清晰的按钮,使用清除按钮如何取消选中单选按钮。



清除按钮



收音机按钮。



当我点击清除按钮时,我想取消选中单选按钮。



我怎样才能使用csharp。



i尝试了但它不起作用。



我的代码如下;



SessAM.Checked = false;





从我上面的代码有什么问题。



代码无效。

注意它是windows应用程序。

解决方案

提供单选按钮选项组,以便用户选择至少一个选项。

因此,当用户清除屏幕时,会选择默认值。



理想情况下,您不应该提供清除所有选项按钮的选项。

如果您想要此功能,请使用复选框。

你好专业人士



ya如果有一组单选按钮那么它的好处是将它们包含在Group box或panel container control中一次只能自动选择一个单选按钮,无需检查= false或任何点击事件为真

所以将它们放在容器控件上。





乐于助人


如果您只需要从列表中获取选项,请使用radioButtons -options形成您的列表使用checkBoxes。 CheckBoxes可以全部取消选中。 RadioButtons只能有一个活动的,而且不能取消选中活动的一个。尝试将您的radioButtons拖动到GroupBox,然后您将创建一组radioButtons,这些组将从其余部分单独工作。然后你可以在单击ClearButton时禁用你的radioButton:



 groupBox1.Enabled =  false ; 





 groupBox1.Hide(); 





你也可以试试它是否对你有所帮助:



 SessAM.Enabled =  false ; 





祝你好运!


I have one clear Button,using clear button how to uncheck the radio button.

Clear button

Radio button.

when i click the clear button, i want to uncheck the radio button.

how can i do using csharp.

i tried but it is not working.

My code as follows;

SessAM.Checked = false;


from my above code what is the problem.

the code is not working.
note it is windows application.

解决方案

A radio button option group is provided so that a user chooses at least one option.
So have a default that is selected when the user clears the screen.

You should not ideally be providing an option to clear out all option buttons.
If you want this functionality, use checkboxes instead.


hello professional

ya if there is group of radio button then its good to contain them in Group box or panel container control that will automatically select only one radio button at a time that no need to checked=false or true on any click event
so put them on a container control.


Happy to help


If you need to get only a option from a list use radioButtons if you need multi-options form your list use checkBoxes. CheckBoxes can be all unchecked. RadioButtons can have only one active one and that active one can''t be unchecked. Try to drag your radioButtons to an GroupBox and then you will create groups of radioButtons that will work individual from the rest. Then you can disable your radioButtons like this when you click your ClearButton:

groupBox1.Enabled = false;


or

groupBox1.Hide();



You can also try if it helps you:

SessAM.Enabled = false;



Good Luck!


这篇关于使用Clear Button如何取消选中单选按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆