Arrow keys and navigating subwindows

I have a Panel with a gridsizer filled with sub-Panels. I'd like to
use the arrow keys to select these sub Panels, but I can't get it to
work.

The arrow keys are generationg wx.EVT_NAVIGATION_KEY events, and I
can't find a)documentation on these events or b) a method on the event
that will tell me which key was pressed.

The arrow keys aren't firing EVT_KEY_UP, EVT_CHAR, or EVT_KEY_DOWN.

This is on WinXP, Python 2.6, and wx.Python 2.8.10.1.

Any suggestions on getting data from the Navigation Key event or
getting the arrow keys to work?

I'm also using Focus events to change the display of the subpanels,
but I suspect this is the wrong tactic. Eventually I want to be able
to use other key events on the subpanels.

Thanks,

Josh English
Joshua.R.English@gmail.com
http://joshenglish.livejournal.com

Are there any other widgets on the panels or is it just the panels? If it's just the panels then you can give them the wx.WANTS_CHARS style and then you should get normal key events for the arrows from the panel that has focus.

···

On 12/30/09 8:07 PM, Josh English wrote:

I have a Panel with a gridsizer filled with sub-Panels. I'd like to
use the arrow keys to select these sub Panels, but I can't get it to
work.

The arrow keys are generationg wx.EVT_NAVIGATION_KEY events, and I
can't find a)documentation on these events or b) a method on the event
that will tell me which key was pressed.

The arrow keys aren't firing EVT_KEY_UP, EVT_CHAR, or EVT_KEY_DOWN.

This is on WinXP, Python 2.6, and wx.Python 2.8.10.1.

Any suggestions on getting data from the Navigation Key event or
getting the arrow keys to work?

I'm also using Focus events to change the display of the subpanels,
but I suspect this is the wrong tactic. Eventually I want to be able
to use other key events on the subpanels.

--
Robin Dunn
Software Craftsman

There will be StaticTexts in the individual panels. wx.WANTS_CHARS
works unless there's another widget that uses the arrow keys, such as
a wx.Choice in the active frame. I may be able to get around this by
changing the style of the application and using menu commands over
widgets.

Josh

···

On Thu, Dec 31, 2009 at 12:56 PM, Robin Dunn <robin@alldunn.com> wrote:

Are there any other widgets on the panels or is it just the panels? If
it's just the panels then you can give them the wx.WANTS_CHARS style and
then you should get normal key events for the arrows from the panel that
has focus.

--
Josh English
Joshua.R.English@gmail.com