Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Toggling radio buttons

 
Avani Joshi
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I want to toggle the radio buttons using left right arrow key. The radio buttons are getting toggled using the tab key. Does any one know the solution to this?

- Thanks in advance.
 
Campbell Ritchie
Sheriff
Pie
Posts: 50251
79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You could try a KeyListener.
 
Brian Cole
Author
Ranch Hand
Posts: 908
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Bhavna Maratkar:
I want to toggle the radio buttons using left right arrow key. The radio buttons are getting toggled using the tab key.


Do you really mean "toggle"?

Radio buttons don't really toggle to begin with, since you unselect
one by selecting another in the same group. But more than that, the
tab key doesn't select or unselect them anayway (at least not under
the usual LookAndFeels). It's the space bar that typically does that.

What the tab key does (usually) is change the focus, so perhaps your
question is actually a focus traversal question??
[ October 01, 2008: Message edited by: Brian Cole ]
 
Avani Joshi
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks everyone for your help. I found the solution to this problem.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic