Results 1 to 3 of 3

Thread: [RESOLVED] Tabbing between RadioButtons

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Sep 2008
    Posts
    28

    Resolved [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 ?

  2. #2
    PowerPoster SJWhiteley's Avatar
    Join Date
    Feb 2009
    Location
    South of the Mason-Dixon Line
    Posts
    2,256

    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!
    "Ok, my response to that is pending a Google search" - Bucky Katt.
    "There are two types of people in the world: Those who can extrapolate from incomplete data sets." - Unk.
    "Before you can 'think outside the box' you need to understand where the box is."

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Sep 2008
    Posts
    28

    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 ...

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width