This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization 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
Posts: 48452
56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You could try a KeyListener.
 
Brian Cole
Author
Ranch Hand
Posts: 903
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