By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,101 Members | 1,340 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,101 IT Pros & Developers. It's quick & easy.

Radio Button question

P: 17
This is a really bad question but I am not familiar with VB. I have three radio buttons in a group box. I want to have it that by default none are checked. I set the checked property on all three to false yet the first one is always checked even if I set it to false. i even tried removing the group box but always one of the boxes is checked. How can I default it to no boxes checked?
Jan 31 '08 #1
Share this Question
Share on Google+
5 Replies


kadghar
Expert 100+
P: 1,295
This is a really bad question but I am not familiar with VB. I have three radio buttons in a group box. I want to have it that by default none are checked. I set the checked property on all three to false yet the first one is always checked even if I set it to false. i even tried removing the group box but always one of the boxes is checked. How can I default it to no boxes checked?
what version of VB are you using?
Jan 31 '08 #2

Expert 5K+
P: 8,434
The technical details will be heavily dependant on the VB version, which is why kadghar asked above. But you might find it's not possible (or difficult to achieve). The whole purpose of radio buttons is to let you "toggle" or "switch" between mutually exclusive options. If one of the options is "no option" then you probably should have a radio button for that.

In the meantime, you might try seeing whether you can be a bit sneaky. For instance, try hiding your default option behind another control, moving it off the edge of the form where it can't be seen, setting them all to unselected in your startup code, or simply setting its visibility to False. I have no idea whether any of these will work - I'm just throwing out whatever ideas come to mind.
Jan 31 '08 #3

debasisdas
Expert 5K+
P: 8,127
set the tabindex property of any other control other than option buttons to 0
Jan 31 '08 #4

P: 68
This is a really bad question but I am not familiar with VB. I have three radio buttons in a group box. I want to have it that by default none are checked. I set the checked property on all three to false yet the first one is always checked even if I set it to false. i even tried removing the group box but always one of the boxes is checked. How can I default it to no boxes checked?

Hi,
You can do this by the following way:
At first you add 'TextBox' to your 'Form' & set its 'Tab Index' property to Zero(0). Then you add 'RadioButton' & 'GroupBox'. You can try by this.

If you get success, reply me.
Get Better.

Regards,
shuvo2k6
Jan 31 '08 #5

Expert 5K+
P: 8,434
set the tabindex property of any other control other than option buttons to 0
In VB6, setting the TabIndex to 0 just places the control first in the tab sequence, everything else simply moves down one place. The only effect that has is the order in which they receive focus as the user hits the Tab key. Is that what you intended? Or is it different in later versions?
Jan 31 '08 #6

Post your reply

Sign in to post your reply or Sign up for a free account.