VB.Net中的RadioButtons [英] RadioButtons in VB.Net

查看:88
本文介绍了VB.Net中的RadioButtons的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



有没有一种方法可以加载带有几个单选按钮的表单,而其中的一个不会默认为选中状态.

我可以在VB6中执行此操作,但是无法在.Net中进行管理!即使我放了

Hi,

Is there a way of loading a form with a couple of Radio Buttons without one of them defaulting to checked.

I could do this in VB6 but can''t manage it in .Net! even if I put

RadioButton1.checked = False
RadioButton2.checked = False




在表单加载"中,它仍默认为选中RadioButton1.

我希望用户决定最初检查哪个按钮.

希望所有这些都有意义,并感谢您的宝贵时间.




in the Form Load it still defaults to RadioButton1 being checked.

I want the User to decide which button gets initially checked.

Hope this all make sense, and thanks for your time.

推荐答案

我个人认为这是错误的做法.单选按钮上应该始终有一个默认选择.添加仅显示未选中"的广播按钮,并在默认情况下进行检查会更正确.
I personally think that''s bad practice. There should always be a default selection on radio buttons. It would be MORE correct to add a radio butotn that simply says "Not selected", and check it by default.


谢谢,我从没想过.

我添加了一个新按钮,使其成为默认的选中按钮,并将其设置为在窗体上不可见,因此用户只有2个可供选择.

实现目标.

再次感谢.
Thank you, I never thought of it that way.

I have added a new button, made it the default checked button and set it to not visible on the form so the user only has the 2 to choose from.

Objective achieved.

Thanks Again.


这篇关于VB.Net中的RadioButtons的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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