[RESOLVED] Tabbing between RadioButtons
A pretty basic question, can I Tab between 2 RadioButtons ?
I have a Form with a Textbox, 2 Radio Buttons, an OK Button & a Cancel Button. They are all set to TabStop=True and have the TabIndex set to 1 through 5 in the order listed.
If I Tab from the TextBox, the first RadioButton receives Focus (though there is a little dotted box between the button & the text, can I avoid that ?) and I can press Space to select it, however, if I press the Tab button again, the second RadioButton is skipped and Focus goes to the OK Button.
This is always the case, whether I select anything or not, the second RadioButton is always skipped. Is this normal behaviour (I suspect yes and it is something to do with the fact that only one of the RadioButtons can be selected) and whether it is or not, can I get around it ? Can I Tab to each of the Five options in order, and if so, how ?
Re: Tabbing between RadioButtons
A group of radio buttons are considered a 'single control', and is normal behavior.
You can get around it, likewise with eliminating the indication that the control has focus, but you have to jump through some hoops to do so. Basically, you want to do something that really isn't expected - you should really reconsider doing this.
There are several ways to do what you want: put the radio buttons in separate groups, and then detect when a radio button is set to unset the others in the group (you can use a group box or, i believe, a panel).
As far as removing the focus - this seems nonsensical if you want to use keyboard navigation!
Re: Tabbing between RadioButtons
Thanks ... the application is aimed at being mouse driven, but as I was testing it I realised that sometimes you type your data into the Textbox and then automatically hit tab to navigate to the RadioButtons. If it's complicated I'll probably just take the tabbing off again ...