Radiobutton keyboard event

I would like to implement the following behavior for a radiobutton group:
Pressing TAB will move the focus out of the group.
Pressing arrow keys will move through the members of group, wrapping to the top (or bottom) when reaching the last (or first) member of the group.

The standard behavior has focus leaving the group when you press the down arrow from the last member of the group.

I have tried to set up a keyboard handler by using radio.Bind(wx.EVT_CHAR,self._onKey) for each radiobutton in my group, but the keyboard characters never go there. What am I doing wrong?

Hank

Hank Knox wrote:

I would like to implement the following behavior for a radiobutton group:
Pressing TAB will move the focus out of the group.
Pressing arrow keys will move through the members of group, wrapping to the top (or bottom) when reaching the last (or first) member of the group.

The standard behavior has focus leaving the group when you press the down arrow from the last member of the group.

I have tried to set up a keyboard handler by using radio.Bind(wx.EVT_CHAR,self._onKey) for each radiobutton in my group, but the keyboard characters never go there. What am I doing wrong?

Try using EVT_KEY_DOWN instead.

ยทยทยท

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!