使用Vb.net检查如何解决radiobutton中默认状态的问题? [英] How to resolve the problems in radiobutton for default state is checked using Vb.net?
问题描述
我在一个组合框中制作3个radiobutton。用户在运行时选择任何一个radiobutton。但是当表格加载时,第一个无线电按钮被默认检查;测验项目也出现同样的问题:问题是4个没有radiobutton.Plz帮助解决这个问题。
I make 3 radiobutton in a groupbox. User select any one of radiobutton at run time. But when form load,the first radiobutton is checked default; This same problem arise for Quiz Project:Question with 4 no of radiobutton.Plz Help to Resolve this problem.
推荐答案
在<$中设置每个RadioButton的Check状态c $ c> Form_Load event
rbOne.Checked = False
或
rbOne.CheckState = CheckState.Unchecked
。
虽然我没有遇到这种情况,但是有一个IDE可能会自动假设至少有一个RadioButtons应该被检查,因为它们都被组合在一个控件中,在这种情况下是一个GroupBox。
Tab Index仅控制Tab序列 - 按下TAB键时光标从一个控件跳到下一个控件的顺序。但是我不确定它是否会确定是否应该检查RadioButton。
.
Although I haven't been in this situation, there is a possibility that the IDE will automatically assume that at least one of the RadioButtons should be Checked since they are all grouped together in a single control, in this case a GroupBox.
The "Tab Index" controls only the Tab sequence - the order in which the cursor will jump from one control to the next when the TAB key is pressed. However I am not sure if it will determine if a RadioButton should be checked or not.
只关注你的问题..只需打开这个radiobuttons所在的窗口。选择每个radiobuttons并将checked属性更改为false。
to be only concern to your problem..just open that window where this radiobuttons are. select every radiobuttons and change checked property to false.
在这种情况下,您必须手动将所有RadioButton对象设置为
RadioButton Form_Shown 事件中.Checked = False 。
Hi, in this case you have to manually set all RadioButton objects to
RadioButton.Checked = False in the Form_Shown event.
这篇关于使用Vb.net检查如何解决radiobutton中默认状态的问题?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!